Sample Application

Note:
Ensure you are using the latest version of the SDK. You can download the latest version of the SDK from GitHub.

Integrate and Run the Sample Application#

  • Make a checkout form using our Checkout Integration.

  • Accept the razorpay_payment_id parameter in the form submission.

  • Run the capture code to capture the payment.

  • Edit the key inside index.ftl.

  • Add you <key_id> and <key_secret> in the server.yml file.

  • Build the test application using the following command:

    Copymvn clean install
  • Run the test application using the following command:

    Copyjava -jar target/razorpay-java-testapp-1.0-SNAPSHOT.jar server server.yml

Note:
If you are re-using this as your final code, please ensure you:

  • Edit the key inside index.ftl file.
  • Edit the <key_id> and <key_secret> inside server.yml file. Use the live keys when using the application to accept live payments. Click here to learn more about how to generate keys.
  • Edit the APPId/APPSecret in the app.py file.