Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions documents/card.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ 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("fail_existing", "1");
JSONObject notes = new JSONObject();
notes.put("notes_key_1","Tea, Earl Grey, Hot");
notes.put("notes_key_2","Tea, Earl Grey… decaf.");
Expand All @@ -22,7 +22,7 @@ Customer customer = instance.customers.create(customerRequest);
| name* | string | Name of the customer |
| email | string | Email of the customer |
| contact | string | Contact number of the customer |
| fail_existing | string | If a customer with the same details already exists, the request throws an exception by default. Possible value is `0` or `1`|
| fail_existing | string | If a customer with the same details already exists, the request throws an exception by default. Possible value is `1` or `0`|
| notes | object | A key-value pair |

**Response:**
Expand Down Expand Up @@ -126,8 +126,8 @@ subscriptionRegistration.put("max_amount",500);
subscriptionRegistration.put("expire_at",1609423824);
registrationLinkRequest.put("subscription_registration", subscriptionRegistration);
registrationLinkRequest.put("receipt", "Receipt No. 1");
registrationLinkRequest.put("email_notify", 1);
registrationLinkRequest.put("sms_notify", 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");
Expand All @@ -148,8 +148,8 @@ Invoice invoice = instance.invoices.createRegistrationLink(registrationLinkReque
| description* | string | A brief description of the payment. |
| subscription_registration | object | All keys listed [here](https://razorpay.com/docs/api/recurring-payments/cards/authorization-transaction/#121-create-a-registration-link) are supported |
| receipt | string | Your system order reference id. |
| 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) |
| sms_notify | boolean | SMS notifications are to be sent by Razorpay (default : true) |
| email_notify | boolean | Email notifications are to be sent by Razorpay (default : true) |
| expire_by | integer | The timestamp, in Unix format, till when the customer can make the authorization payment. |
| notes | array | A key-value pair |

Expand Down Expand Up @@ -288,7 +288,7 @@ paymentRequest.put("currency", "INR");
paymentRequest.put("order_id", "order_1Aa00000000002");
paymentRequest.put("customer_id", "cust_1Aa00000000001");
paymentRequest.put("token", "token_1Aa00000000001");
paymentRequest.put("recurring", 1);
paymentRequest.put("recurring", true);
paymentRequest.put("description", "Creating recurring payment for Gaurav Kumar");
JSONObject notes = new JSONObject();
notes.put("notes_key_1","Tea, Earl Grey, Hot");
Expand All @@ -308,7 +308,7 @@ Payment payment = instance.payments.createRecurringPayment(paymentRequest);
| orderId* | string | The id of the order to be fetched |
| customerId* | string | The id of the customer to be fetched |
| tokenId* | string | The id of the token to be fetched |
| recurring* | boolean | Possible values is `0` or `1` |
| recurring* | boolean | Possible values is `true` or `false` |
| description | string | A brief description of the payment. |
| notes | object | A key-value pair |

Expand Down
4 changes: 2 additions & 2 deletions documents/customers.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ 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("fail_existing", "1");
customerRequest.put("gstin","29XAbbA4369J1PA");
JSONObject notes = new JSONObject();
notes.put("notes_key_1","Tea, Earl Grey, Hot");
Expand All @@ -24,7 +24,7 @@ Customer customer = instance.customers.create(customerRequest);
| name* | string | Name of the customer |
| email | string | Email of the customer |
| contact | string | Contact number of the customer |
| fail_existing | string | If a customer with the same details already exists, the request throws an exception by default. Possible value is `0` or `1`|
| fail_existing | string | If a customer with the same details already exists, the request throws an exception by default. Possible value is `1` or `0`|
| gstin | string | Customer's GST number, if available. For example, 29XAbbA4369J1PA |
| notes | object | A key-value pair |

Expand Down
15 changes: 8 additions & 7 deletions documents/emandate.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ 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("fail_existing", "1");
customerRequest.put("gstin","29XAbbA4369J1PA");
JSONObject notes = new JSONObject();
notes.put("notes_key_1","Tea, Earl Grey, Hot");
Expand All @@ -23,7 +23,7 @@ Customer customer = instance.customers.create(customerRequest);
| name* | string | Name of the customer |
| email | string | Email of the customer |
| contact | string | Contact number of the customer |
| fail_existing | string | If a customer with the same details already exists, the request throws an exception by default. Possible value is `0` or `1`|
| fail_existing | string | If a customer with the same details already exists, the request throws an exception by default. Possible value is `1` or `0`|
| notes | object | A key-value pair |

**Response:**
Expand Down Expand Up @@ -129,8 +129,8 @@ 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", 1);
registrationLinkRequest.put("sms_notify", 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");
Expand All @@ -150,7 +150,8 @@ Invoice invoice = instance.invoices.createRegistrationLink(registrationLinkReque
| 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 | 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) |
| sms_notify | boolean | SMS notifications are to be sent by Razorpay (default : true) |
| email_notify | boolean | Email notifications are to be sent by Razorpay (default : true) |
| 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 |
Expand Down Expand Up @@ -451,7 +452,7 @@ paymentRequest.put("currency", "INR");
paymentRequest.put("order_id", "order_1Aa00000000002");
paymentRequest.put("customer_id", "cust_1Aa00000000001");
paymentRequest.put("token", "token_1Aa00000000001");
paymentRequest.put("recurring", 1);
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");
Expand All @@ -471,7 +472,7 @@ Payment payment = instance.payments.createRecurringPayment(paymentRequest);
| order_id* | string | The unique identifier of the order created. |
| customer_id* | string | The `customer_id` for the customer you want to charge. |
| token* | string | The `token_id` generated when the customer successfully completes the authorization payment. Different payment instruments for the same customer have different `token_id`.|
| recurring* | string | Determines if recurring payment is enabled or not. Possible values:<br>* `1` - Recurring is enabled.* `0` - Recurring is not enabled.|
| recurring* | string | Determines if recurring payment is enabled or not. Possible values:<br>* `true` - Recurring is enabled.* `false` - Recurring is not enabled.|
| description | string | A user-entered description for the payment.|
| 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. |

Expand Down
6 changes: 3 additions & 3 deletions documents/invoice.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ lineItems.put("currency","INR");
lineItems.put("quantity",1);
lines.add(lineItems);
invoiceRequest.put("line_items",lines);
invoiceRequest.put("email_notify", 1);
invoiceRequest.put("sms_notify", 1);
invoiceRequest.put("email_notify", true);
invoiceRequest.put("sms_notify", true);
invoiceRequest.put("currency","INR");
invoiceRequest.put("expire_by", 1580479824);

Expand Down Expand Up @@ -91,7 +91,7 @@ Invoice invoice = instance.invoices.create(invoiceRequest);
| 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) |
| email_notify | boolean | Email notifications are to be sent by Razorpay (default : true) |
| expire_by | integer | The timestamp, in Unix format, till when the customer can make the authorization payment. |

**Response:**
Expand Down
12 changes: 6 additions & 6 deletions documents/papernach.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ 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("fail_existing", "1");
customerRequest.put("gstin","29XAbbA4369J1PA");
JSONObject notes = new JSONObject();
notes.put("notes_key_1","Tea, Earl Grey, Hot");
Expand All @@ -23,7 +23,7 @@ Customer customer = instance.customers.create(customerRequest);
| name* | string | Name of the customer |
| email | string | Email of the customer |
| contact | string | Contact number of the customer |
| fail_existing | string | If a customer with the same details already exists, the request throws an exception by default. Possible value is `0` or `1`|
| fail_existing | string | If a customer with the same details already exists, the request throws an exception by default. Possible value is `1` or `0`|
| notes | object | A key-value pair |

**Response:**
Expand Down Expand Up @@ -193,8 +193,8 @@ subscriptionRegistration.put("bank_account",bankAccount);
subscriptionRegistration.put("nach",nach);
registrationLinkRequest.put("subscription_registration", subscriptionRegistration);
registrationLinkRequest.put("receipt", "Receipt No. #111");
registrationLinkRequest.put("email_notify", 1);
registrationLinkRequest.put("sms_notify", 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");
Expand Down Expand Up @@ -672,7 +672,7 @@ paymentRequest.put("currency", "INR");
paymentRequest.put("order_id", "order_1Aa00000000002");
paymentRequest.put("customer_id", "cust_1Aa00000000001");
paymentRequest.put("token", "token_1Aa00000000001");
paymentRequest.put("recurring", 1);
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");
Expand All @@ -692,7 +692,7 @@ Payment payment = instance.payments.createRecurringPayment(paymentRequest);
| order_id* | string | The unique identifier of the order created. |
| customer_id* | string | The `customer_id` for the customer you want to charge. |
| token* | string | The `token_id` generated when the customer successfully completes the authorization payment. Different payment instruments for the same customer have different `token_id`.|
| recurring* | string | Determines if recurring payment is enabled or not. Possible values:<br>* `1` - Recurring is enabled.* `0` - Recurring is not enabled.|
| recurring* | string | Determines if recurring payment is enabled or not. Possible values:<br>* `true` - Recurring is enabled.* `false` - Recurring is not enabled.|
| description | string | A user-entered description for the payment.|
| 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. |

Expand Down
34 changes: 23 additions & 11 deletions documents/payment.md
Original file line number Diff line number Diff line change
Expand Up @@ -441,16 +441,28 @@ JSONObject paymentRequest = new JSONObject();
paymentRequest.put("amount",500);
paymentRequest.put("currency","INR");
paymentRequest.put("email", "gaurav.kumar@example.com");
paymentRequest.put("contact", "9123456789");
paymentRequest.put("order_id", "order_JZluwjknyWdhnU");
paymentRequest.put("order_id", "order_DPzFe1Q1dEOKed");
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","25");
card.put("name","Gaurav Kumar");
paymentRequest.put("card",card);
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);
```
Expand Down Expand Up @@ -650,7 +662,7 @@ paymentRequest.put("email", "gaurav.kumar@example.com");
paymentRequest.put("contact", "9123456789");
paymentRequest.put("method", "upi");
paymentRequest.put("customer_id", "cust_EIW4T2etiweBmG");
paymentRequest.put("save", 1);
paymentRequest.put("save", true);
paymentRequest.put("ip", "192.168.0.103");
paymentRequest.put("referer", "http");
paymentRequest.put("user_agent", "Mozilla/5.0");
Expand Down Expand Up @@ -678,7 +690,7 @@ Payment payment = instance.payments.createUpi(paymentRequest);
| contact* | string | Contact number of the customer |
| notes | object | A key-value pair |
| description | string | Descriptive text of the payment. |
| save | boolean | Specifies if the VPA should be stored as tokens.Possible value is `0`, `1` |
| save | boolean | Specifies if the VPA should be stored as tokens.Possible value is `true`, `false` |
| callback_url | string | URL where Razorpay will submit the final payment status. |
| ip* | string | The client's browser IP address. For example `117.217.74.98` |
| referer* | string | Value of `referer` header passed by the client's browser. For example, `https://example.com/` |
Expand Down Expand Up @@ -728,7 +740,7 @@ Payment payment = instance.payments.createUpi(paymentRequest);
| contact* | string | Contact number of the customer |
| notes | object | A key-value pair |
| description | string | Descriptive text of the payment. |
| save | boolean | Specifies if the VPA should be stored as tokens.Possible value is `0`, `1` |
| save | boolean | Specifies if the VPA should be stored as tokens.Possible value is `true`, `false` |
| callback_url | string | URL where Razorpay will submit the final payment status. |
| ip* | string | The client's browser IP address. For example `117.217.74.98` |
| referer* | string | Value of `referer` header passed by the client's browser. For example, `https://example.com/` |
Expand Down
Loading