Skip to content

rahulkrvnit/razorpay-java

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

406 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

THIS IS UNOFFICIAL UPDATED CODEBASE OF RAZORPAY JAVA SDK. The codebase has been updated with Java 17 with sourcecode and compile version with all dependencies with latest versions The codebase is free from any security checked with checkmarx and sonarlint

Razorpay Java SDK

Official java bindings for the Razorpay API.

Documentation

Documentation of Razorpay's API and their usage is available at https://docs.razorpay.com

Requirements

Java 1.8 or later

Mock Tests Support till Java 1.8

Installation

Maven users

Add this dependency to your project's POM:

<dependency>
 <groupId>com.razorpay</groupId>
 <artifactId>razorpay-java</artifactId>
 <version>1.4.3</version>
</dependency>

Gradle users

Add this dependency to your project's build file:

implementation "com.razorpay:razorpay-java:1.4.3"

Usage

Instantiate RazorpayClient with key_id & key_secret. You can obtain the keys from the dashboard app https://dashboard.razorpay.com/#/app/keys

// Initialize client
RazorpayClient instance = new RazorpayClient("key_id", "key_secret");
  • Add custom headers to request (optional)
Map<String, String> headers = new HashMap<String, String>();
razorpayClient.addHeaders(headers);

Supported Resources


  • Make custom requests

You can make custom API requests using clients. For example, here is how to make custom request to /payments/path endpoint.

Entity response = razorpayClient.Payments.post("path", JSONObject requestBody);

About

Razorpay Java SDK

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%