Skip to content

Commit

Permalink
Merge pull request #194 from razorpay/order_doc_correction
Browse files Browse the repository at this point in the history
order doc correction
  • Loading branch information
ankitdas13 authored Jul 7, 2022
2 parents 237aa97 + 09b653c commit c360769
Show file tree
Hide file tree
Showing 29 changed files with 891 additions and 262 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Documentation of Razorpay's API and their usage is available at <https://docs.ra

## Requirements

Java 1.7 or later
Java 1.8 or later

Mock Tests Support till Java 1.8

Expand All @@ -23,7 +23,7 @@ Add this dependency to your project's POM:
<dependency>
<groupId>com.razorpay</groupId>
<artifactId>razorpay-java</artifactId>
<version>1.4.2</version>
<version>1.4.3</version>
</dependency>
```

Expand All @@ -32,7 +32,7 @@ Add this dependency to your project's POM:
Add this dependency to your project's build file:

```groovy
compile "com.razorpay:razorpay-java:1.4.2"
implementation "com.razorpay:razorpay-java:1.4.3"
```

## Usage
Expand Down
2 changes: 1 addition & 1 deletion documents/addon.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ Addon addon = instance.addons.fetch(addonId);
```java
String addonId = "ao_00000000000001";

List<Addon> addon = instance.addons.delete(addonId)
List<Addon> addon = instance.addons.delete(addonId);
```

**Parameters:**
Expand Down
18 changes: 9 additions & 9 deletions documents/card.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ Invoice invoice = instance.invoices.createRegistrationLink(registrationLinkReque

| Name | Type | Description |
|-----------------|---------|------------------------------------------------------------------------------|
| customer | object | Details of the customer to whom the registration link will be sent. |
| type* | string | the value is `link`. |
| customer | object | All parameters listed [here](https://razorpay.com/docs/api/payments/recurring-payments/cards/create-authorization-transaction/#121-create-a-registration-link) are supported |
| type* | object | the value is `link`. |
| amount* | integer | The amount to be captured (should be equal to the authorized amount, in paise) |
| currency* | string | The currency of the payment (defaults to INR) |
| description* | string | A brief description of the payment. |
Expand All @@ -151,7 +151,7 @@ Invoice invoice = instance.invoices.createRegistrationLink(registrationLinkReque
| sms_notify | boolean | SMS notifications are to be sent by Razorpay (default : 1) |
| email_notify | boolean | Email notifications are to be sent by Razorpay (default : 1) |
| expire_by | integer | The timestamp, in Unix format, till when the customer can make the authorization payment. |
| notes | object | A key-value pair |
| notes | array | A key-value pair |

**Response:**
```json
Expand Down Expand Up @@ -243,8 +243,8 @@ Order order = instance.orders.create(orderRequest);
| customerId* | string | The id of the customer to be fetched |
| method | string | Payment method used to make the registration transaction. Possible value is `card`. |
| receipt | string | Your system order reference id. |
| token | array | All keys listed [here](https://razorpay.com/docs/api/recurring-payments/cards/subsequent-payments/#31-create-an-order-to-charge-the-customer) are supported |
| notes | array | A key-value pair |
| token | object | All keys listed [here](https://razorpay.com/docs/api/recurring-payments/cards/subsequent-payments/#31-create-an-order-to-charge-the-customer) are supported |
| notes | object | A key-value pair |
| payment_capture | boolean | Indicates whether payment status should be changed to captured automatically or not. Possible values: true - Payments are captured automatically. false - Payments are not captured automatically. |

**Response:**
Expand Down Expand Up @@ -357,7 +357,7 @@ Invoice invoice = instance.invoices.notifyBy(invoiceId,medium);
```java
String invoiceId = "inv_FHrXGIpd3N17DX";

Invoice invoice = instance.invoices.cancel(invoiceId)
Invoice invoice = instance.invoices.cancel(invoiceId);
```
**Parameters:**

Expand Down Expand Up @@ -430,7 +430,7 @@ Invoice invoice = instance.invoices.cancel(invoiceId)
```java
String paymentId = "pay_FHfqtkRzWvxky4";

Payment payment = instance.payments.fetch(paymentId)
Payment payment = instance.payments.fetch(paymentId);
```
**Parameters:**

Expand Down Expand Up @@ -486,7 +486,7 @@ Payment payment = instance.payments.fetch(paymentId)
```java
String customerId = "cust_DtHaBuooGHTuyZ";

List<Token> tokens = instance.customers.fetchTokens(customerId)
List<Token> tokens = instance.customers.fetchTokens(customerId);
```
**Parameters:**

Expand Down Expand Up @@ -577,7 +577,7 @@ String customerId = "cust_Hwq7Ba6TDXl1ga";

String tokenId = "token_1Aa00000000001";

Customer customer = instance.customers.deleteToken(customerId,tokenId)
Customer customer = instance.customers.deleteToken(customerId,tokenId);
```
**Parameters:**

Expand Down
20 changes: 13 additions & 7 deletions documents/emandate.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,11 @@ Order order = instance.orders.create(orderRequest);
| currency* | string | Currency of the order. Currently only `INR` is supported. |
| method* | string | The authorization method. In this case the value will be `emandate` |
| receipt | string | Your system order reference id. |
| notes | object | A key-value pair |
| customer_id* | string | The `customer_id` for the customer you want to charge.|
| payment_capture | boolean | Indicates whether payment status should be changed to captured automatically or not. Possible values: true - Payments are captured automatically. false - Payments are not captured automatically. |
| token | object | A key-value pair |
| notes | object | A key-value pair |
| token | object | All parameters listed [here](https://razorpay.com/docs/api/payments/recurring-payments/emandate/create-authorization-transaction/#112-create-an-order) are supported|


**Response:**

Expand Down Expand Up @@ -142,13 +144,16 @@ Invoice invoice = instance.invoices.createRegistrationLink(registrationLinkReque

| Name | Type | Description |
|-----------------|---------|------------------------------------------------------------------------------|
| customer | object | Details of the customer to whom the registration link will be sent. |
| customer* | object | All parameters listed [here](https://razorpay.com/docs/api/payments/recurring-payments/emandate/create-authorization-transaction/#121-create-a-registration-link) are supported |
| type* | string | In this case, the value is `link`. |
| currency* | string | The 3-letter ISO currency code for the payment. Currently, only `INR` is supported. |
| amount* | integer | The payment amount in the smallest currency sub-unit. |
| description* | string | A description that appears on the hosted page. For example, `12:30 p.m. Thali meals (Gaurav Kumar`). |
| subscription_registration | object | Details of the authorization payment. |
| notes | object | A key-value pair |
| subscription_registration | array | All parameters listed [here](https://razorpay.com/docs/api/payments/recurring-payments/emandate/create-authorization-transaction/#121-create-a-registration-link) are supported |
| email_notify | boolean | Email notifications are to be sent by Razorpay (default : 1) |
| expire_by | integer | The timestamp, in Unix format, till when the customer can make the authorization payment. |
| receipt | string | Your system order reference id. |
| notes | object | A key-value pair |

**Response:**

Expand Down Expand Up @@ -314,7 +319,7 @@ Payment payment = instance.payments.fetch(paymentId);
```java
String customerId = "cust_DtHaBuooGHTuyZ";

Customer customer = instance.customers.fetchTokens(customerId);
List<Token> tokens = instance.customers.fetchTokens(customerId);
```

**Parameters:**
Expand Down Expand Up @@ -410,7 +415,8 @@ Order order = instance.orders.create(orderRequest);
| amount* | integer | Amount of the order to be paid |
| currency* | string | Currency of the order. Currently only `INR` is supported. |
| receipt | string | Your system order reference id. |
| notes | object | A key-value pair |
| notes | object | A key-value pair |
| payment_capture* | boolean | Indicates whether payment status should be changed to captured automatically or not. Possible values: true - Payments are captured automatically. false - Payments are not captured automatically. |

**Response:**
```json
Expand Down
37 changes: 23 additions & 14 deletions documents/fund.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ FundAccount fundaccount = instance.fundAccount.create(fundAccountRequest);
### Fetch all fund accounts

```java
String customerId = "cust_Aa000000000001";
JSONObject fundAccountRequest = new JSONObject();
fundAccountRequest.put("customer_id","cust_JDdNazagOgg9Ig");

FundAccount fundaccount = instance.fundAccount.fetch(customerId);
List<FundAccount> fundaccount = instance.fundAccount.fetchAll(fundAccountRequest);
```

**Parameters:**
Expand All @@ -58,18 +59,26 @@ FundAccount fundaccount = instance.fundAccount.fetch(customerId);
**Response:**
```json
{
"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
"entity": "collection",
"count": 2,
"items": [
{
"id": "fa_JcXaLomo4ck5IY",
"entity": "fund_account",
"customer_id": "cust_JZse2vlC5nK9AQ",
"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": 1654154246
}
]
}
```
-------------------------------------------------------------------------------------------------------
Expand Down
22 changes: 14 additions & 8 deletions documents/invoice.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,13 @@ Invoice invoice = instance.invoices.create(invoiceRequest);
|-----------------|---------|------------------------------------------------------------------------------|
|type* | string | entity type (here its invoice) |
|description | string | A brief description of the invoice. |
|customer_id | string | customer id for which invoice need be raised |
|customer | array | customer details in a array format |
|line_items* | array | Details of the line item that is billed in the invoice. |
|expire_by | array | Details of the line item that is billed in the invoice. |
|sms_notify | array | Details of the line item that is billed in the invoice. |
|email_notify | array | Details of the line item that is billed in the invoice. |
|customer_id | string | customer id for which invoice need be raised |
|draft | string | Invoice is created in draft state when value is set to `1` |
| customer* | object | All parameters listed [here](https://razorpay.com/docs/api/payments/invoices/#create-an-invoice) are supported |
| line_items | array | All parameters listed [here](https://razorpay.com/docs/api/payments/invoices/#create-an-invoice) are supported |
|expire_by | integer | Details of the line item that is billed in the invoice. |
|sms_notify | boolean | Details of the line item that is billed in the invoice. |
|email_notify | boolean | Details of the line item that is billed in the invoice. |
|partial_payment | boolean | Indicates whether customers can make partial payments on the invoice . Possible values: true - Customer can make partial payments. false (default) - Customer cannot make partial payments. |
| currency* | string | The currency of the payment (defaults to INR) |

Expand Down Expand Up @@ -86,7 +87,12 @@ Invoice invoice = instance.invoices.create(invoiceRequest);
|type* | string | entity type (here its invoice) |
|description | string | A brief description of the invoice. |
|customer_id | string | customer id for which invoice need be raised |
|customer | object | customer details in a object format |
| customer* | array | All parameters listed [here](https://razorpay.com/docs/api/payments/invoices/#create-an-invoice) are supported |
| line_items | array | All parameters listed [here](https://razorpay.com/docs/api/payments/invoices/#create-an-invoice) are supported |
| sms_notify | boolean | SMS notifications are to be sent by Razorpay (default : 1) |
| currency* (conditionally mandatory) | string | The 3-letter ISO currency code for the payment. Currently, only `INR` is supported. |
| email_notify | boolean | Email notifications are to be sent by Razorpay (default : 1) |
| expire_by | integer | The timestamp, in Unix format, till when the customer can make the authorization payment. |

**Response:**

Expand Down Expand Up @@ -397,7 +403,7 @@ Invoice invoice = instance.invoices.issue(invoiceId);
```java
String invoiceId = "inv_DAweOiQ7amIUVd";

List<Invoice> invoice = instance.invoices.delete(InvoiceId);
List<Invoice> invoice = instance.invoices.delete(invoiceId);
```

**Parameters:**
Expand Down
Loading

0 comments on commit c360769

Please sign in to comment.