Skip to content

Commit edc7760

Browse files
authored
fix: Boolean correction in doc (#449)
* fix: Boolean correction in doc * fail existing value correction
1 parent 14facfa commit edc7760

12 files changed

Lines changed: 107 additions & 77 deletions

documents/card.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ instance.customers.create({
66
"name": "Gaurav Kumar",
77
"email": "gaurav.kumar@example.com",
88
"contact": "9123456780",
9-
"fail_existing": "0",
9+
"fail_existing": "1",
1010
"notes":{
1111
"note_key_1": "September",
1212
"note_key_2": "Make it so."
@@ -21,7 +21,7 @@ instance.customers.create({
2121
| name* | string | Name of the customer |
2222
| email | string | Email of the customer |
2323
| contact | string | Contact number of the customer |
24-
| 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`|
24+
| 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`|
2525
| notes | object | A key-value pair |
2626

2727
**Response:**
@@ -124,8 +124,8 @@ instance.subscriptions.createRegistrationLink({
124124
"expire_at": 1609423824
125125
},
126126
"receipt": "Receipt No. 1",
127-
"email_notify": 1,
128-
"sms_notify": 1,
127+
"email_notify": true,
128+
"sms_notify": true,
129129
"expire_by": 1580479824,
130130
"notes": {
131131
"notes_key_1": "Tea, Earl Grey, Hot",
@@ -145,8 +145,8 @@ instance.subscriptions.createRegistrationLink({
145145
| description* | string | A brief description of the payment. |
146146
| subscription_registration | object | All keys listed [here](https://razorpay.com/docs/api/recurring-payments/cards/authorization-transaction/#121-create-a-registration-link) are supported |
147147
| receipt | string | Your system order reference id. |
148-
| sms_notify | boolean | SMS notifications are to be sent by Razorpay (default : 1) |
149-
| email_notify | boolean | Email notifications are to be sent by Razorpay (default : 1) |
148+
| sms_notify | boolean | SMS notifications are to be sent by Razorpay |
149+
| email_notify | boolean | Email notifications are to be sent by Razorpay |
150150
| expire_by | integer | The timestamp, in Unix format, till when the customer can make the authorization payment. |
151151
| notes | object | A key-value pair |
152152

@@ -283,7 +283,7 @@ instance.payments.createRecurringPayment({
283283
"order_id": "order_IDts8IQBJT40aQ",
284284
"customer_id": "cust_Hwq7Ba6TDXl1ga",
285285
"token": "token_1Aa00000000001",
286-
"recurring": 1,
286+
"recurring": true,
287287
"description": "Creating recurring payment for Gaurav Kumar",
288288
"notes": {
289289
"note_key 1": "Beam me up Scotty",
@@ -302,7 +302,7 @@ instance.payments.createRecurringPayment({
302302
| orderId* | string | The id of the order to be fetched |
303303
| customerId* | string | The id of the customer to be fetched |
304304
| tokenId* | string | The id of the token to be fetched |
305-
| recurring* | boolean | Possible values is `0` or `1` |
305+
| recurring* | boolean | Possible values is `true` or `false` |
306306
| description | string | A brief description of the payment. |
307307
| notes | object | A key-value pair |
308308

documents/customer.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ instance.customers.create({
66
"name": "Gaurav Kumar",
77
"contact": 9123456780,
88
"email": "gaurav.kumar@example.com",
9-
"fail_existing": 0,
9+
"fail_existing": "1",
1010
"gstin": "29XAbbA4369J1PA",
1111
"notes": {
1212
"notes_key_1": "Tea, Earl Grey, Hot",
@@ -22,7 +22,7 @@ instance.customers.create({
2222
| name* | string | Name of the customer |
2323
| email | string | Email of the customer |
2424
| contact | string | Contact number of the customer |
25-
| 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`|
25+
| 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`|
2626
| gstin | string | Customer's GST number, if available. For example, 29XAbbA4369J1PA |
2727
| notes | object | A key-value pair |
2828

documents/emandate.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ instance.customers.create({
66
"name": "Gaurav Kumar",
77
"contact": 9123456780,
88
"email": "gaurav.kumar@example.com",
9-
"fail_existing": 0,
9+
"fail_existing": "1",
1010
"gstin": "29XAbbA4369J1PA",
1111
"notes": {
1212
"notes_key_1": "Tea, Earl Grey, Hot",
@@ -21,7 +21,7 @@ instance.customers.create({
2121
|---------------|-------------|---------------------------------------------|
2222
| name* | string | Name of the customer |
2323
| email | string | Email of the customer |
24-
| 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`|
24+
| 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`|
2525
| contact | string | Contact number of the customer |
2626
| notes | object | A key-value pair |
2727

@@ -124,8 +124,8 @@ instance.subscriptions.createRegistrationLink({
124124
},
125125
"receipt": "Receipt no. 1",
126126
"expire_by": 1880480689,
127-
"sms_notify": 1,
128-
"email_notify": 1,
127+
"sms_notify": true,
128+
"email_notify": true,
129129
"notes": {
130130
"note_key 1": "Beam me up Scotty",
131131
"note_key 2": "Tea. Earl Gray. Hot."
@@ -143,7 +143,7 @@ instance.subscriptions.createRegistrationLink({
143143
| amount* | integer | The payment amount in the smallest currency sub-unit. |
144144
| description* | string | A description that appears on the hosted page. For example, `12:30 p.m. Thali meals (Gaurav Kumar`). |
145145
| 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 |
146-
| email_notify | boolean | Email notifications are to be sent by Razorpay (default : 1) |
146+
| email_notify | boolean | Email notifications are to be sent by Razorpay (default : true) |
147147
| expire_by | integer | The timestamp, in Unix format, till when the customer can make the authorization payment. |
148148
| receipt | string | Your system order reference id. |
149149
| notes | array | A key-value pair |
@@ -453,7 +453,7 @@ instance.payments.createRecurringPayment({
453453
"order_id": "order_1Aa00000000002",
454454
"customer_id": "cust_1Aa00000000001",
455455
"token": "token_1Aa00000000001",
456-
"recurring": "1",
456+
"recurring": true,
457457
"description": "Creating recurring payment for Gaurav Kumar",
458458
"notes": {
459459
"note_key 1": "Beam me up Scotty",
@@ -473,7 +473,7 @@ instance.payments.createRecurringPayment({
473473
| order_id* | string | The unique identifier of the order created. |
474474
| customer_id* | string | The `customer_id` for the customer you want to charge. |
475475
| 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`.|
476-
| recurring* | string | Determines if recurring payment is enabled or not. Possible values:<br>* `1` - Recurring is enabled.* `0` - Recurring is not enabled.|
476+
| recurring* | string | Determines if recurring payment is enabled or not. Possible values:<br>* `true` - Recurring is enabled.* `false` - Recurring is not enabled.|
477477
| description | string | A user-entered description for the payment.|
478478
| 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. |
479479

documents/invoice.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ instance.invoice.create({
4040
"quantity": 1
4141
}
4242
],
43-
"sms_notify": 1,
44-
"email_notify": 1,
43+
"sms_notify": true,
44+
"email_notify": true,
4545
"currency": "USD",
4646
"expire_by": 1589765167
4747
})

documents/order.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ instance.orders.create({
349349
| currency* | string | The currency in which the transaction should be made. default value is `INR`|
350350
| receipt | string | Your receipt id for this order should be passed here. Maximum length of 40 characters. |
351351
| notes | array | Key-value pair that can be used to store additional information about the entity.|
352-
| rto_review | boolean | Identifier to mark the order eligible for RTO risk prediction. Possible values is `0` or `1` |
352+
| rto_review | boolean | Identifier to mark the order eligible for RTO risk prediction. Possible values is `true` or `false` |
353353
| line_items | array | All keys listed [here](https://razorpay.com/docs/payments/magic-checkout/rto-intelligence/#step-1-create-an-order) are supported |
354354
| line_items_total | integer | Sum of offer_price for all line items added in the cart in paise. |
355355
| shipping_fee | integer | Shipping fee charged on the line items in paisa. |

documents/papernach.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ instance.customers.create({
66
"name": "Gaurav Kumar",
77
"contact": 9123456780,
88
"email": "gaurav.kumar@example.com",
9-
"fail_existing": 0,
9+
"fail_existing": "1",
1010
"gstin": "29XAbbA4369J1PA",
1111
"notes": {
1212
"notes_key_1": "Tea, Earl Grey, Hot",
@@ -22,7 +22,7 @@ instance.customers.create({
2222
| name* | string | Name of the customer |
2323
| email | string | Email of the customer |
2424
| contact | string | Contact number of the customer |
25-
| 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`|
25+
| 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`|
2626
| notes | object | A key-value pair |
2727

2828
**Response:**
@@ -193,8 +193,8 @@ instance.subscriptions.createRegistrationLink({
193193
"max_amount": 50000
194194
},
195195
"receipt": "Receipt No. 1",
196-
"sms_notify": 1,
197-
"email_notify": 1,
196+
"sms_notify": true,
197+
"email_notify": true,
198198
"expire_by": 1647483647,
199199
"notes": {
200200
"note_key 1": "Beam me up Scotty",
@@ -212,8 +212,8 @@ instance.subscriptions.createRegistrationLink({
212212
| amount* | integer | The payment amount in the smallest currency sub-unit. |
213213
| description* | string | A description that appears on the hosted page. For example, `12:30 p.m. Thali meals (Gaurav Kumar`). |
214214
| subscription_registration | array | All parameters listed [here](https://razorpay.com/docs/api/payments/recurring-payments/paper-nach/create-authorization-transaction/#121-create-a-registration-link) |
215-
| sms_notify | boolean | SMS notifications are to be sent by Razorpay (default : 1) |
216-
| email_notify | boolean | Email notifications are to be sent by Razorpay (default : 1) |
215+
| sms_notify | boolean | SMS notifications are to be sent by Razorpay (default : true) |
216+
| email_notify | boolean | Email notifications are to be sent by Razorpay (default : true) |
217217
| expire_by | integer | The timestamp, in Unix format, till when the customer can make the authorization payment. |
218218
| receipt | string | Your system order reference id. |
219219
| notes | array | A key-value pair |
@@ -632,7 +632,7 @@ instance.payments.createRecurringPayment({
632632
"order_id": "order_1Aa00000000002",
633633
"customer_id": "cust_1Aa00000000001",
634634
"token": "token_1Aa00000000001",
635-
"recurring": "1",
635+
"recurring": true,
636636
"description": "Creating recurring payment for Gaurav Kumar",
637637
"notes": {
638638
"note_key 1": "Beam me up Scotty",
@@ -652,7 +652,7 @@ instance.payments.createRecurringPayment({
652652
| order_id* | string | The unique identifier of the order created. |
653653
| customer_id* | string | The `customer_id` for the customer you want to charge. |
654654
| 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`.|
655-
| recurring* | string | Determines if recurring payment is enabled or not. Possible values:<br>* `1` - Recurring is enabled.* `0` - Recurring is not enabled.|
655+
| recurring* | string | Determines if recurring payment is enabled or not. Possible values:<br>* `true` - Recurring is enabled.* `false` - Recurring is not enabled.|
656656
| description | string | A user-entered description for the payment.|
657657
| 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. |
658658

documents/payment.md

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -500,19 +500,30 @@ instance.orders.create({
500500

501501
```js
502502
instance.payments.createPaymentJson({
503-
"amount": 100,
504-
"currency": "INR",
505-
"order_id": "order_EAkbvXiCJlwhHR",
506-
"email": "gaurav.kumar@example.com",
507-
"contact": 9090909090,
508-
"method": "card",
509-
"card":{
510-
"number": 4111111111111111,
511-
"name": "Gaurav",
512-
"expiry_month": 11,
513-
"expiry_year": 23,
514-
"cvv": 100
515-
}
503+
"amount": 100,
504+
"currency": "INR",
505+
"contact": "9000090000",
506+
"email": "gaurav.kumar@example.com",
507+
"order_id": "order_DPzFe1Q1dEOKed",
508+
"method": "card",
509+
"card": {
510+
"number": "4386289407660153",
511+
"name": "Gaurav",
512+
"expiry_month": 11,
513+
"expiry_year": 30,
514+
"cvv": 100
515+
},
516+
"authentication": {
517+
"authentication_channel": "browser"
518+
},
519+
"browser": {
520+
"java_enabled": false,
521+
"javascript_enabled": false,
522+
"timezone_offset": 11,
523+
"color_depth": 23,
524+
"screen_width": 23,
525+
"screen_height": 100
526+
}
516527
})
517528
```
518529

@@ -705,7 +716,7 @@ instance.payments.createUpi({
705716
"contact": "9123456789",
706717
"method": "upi",
707718
"customer_id": "cust_EIW4T2etiweBmG",
708-
"save": 1,
719+
"save": true,
709720
"ip": "192.168.0.103",
710721
"referer": "http",
711722
"user_agent": "Mozilla/5.0",
@@ -732,7 +743,7 @@ instance.payments.createUpi({
732743
| contact* | string | Contact number of the customer |
733744
| notes | array | A key-value pair |
734745
| description | string | Descriptive text of the payment. |
735-
| save | boolean | Specifies if the VPA should be stored as tokens.Possible value is `0`, `1` |
746+
| save | boolean | Specifies if the VPA should be stored as tokens.Possible value is `true`, `false` |
736747
| callback_url | string | URL where Razorpay will submit the final payment status. |
737748
| ip* | string | The client's browser IP address. For example `117.217.74.98` |
738749
| referer* | string | Value of `referer` header passed by the client's browser. For example, `https://example.com/` |
@@ -780,7 +791,7 @@ instance.payments.createUpi({
780791
| contact* | string | Contact number of the customer |
781792
| notes | array | A key-value pair |
782793
| description | string | Descriptive text of the payment. |
783-
| save | boolean | Specifies if the VPA should be stored as tokens.Possible value is `0`, `1` |
794+
| save | boolean | Specifies if the VPA should be stored as tokens.Possible value is `true`, `false` |
784795
| callback_url | string | URL where Razorpay will submit the final payment status. |
785796
| ip* | string | The client's browser IP address. For example `117.217.74.98` |
786797
| referer* | string | Value of `referer` header passed by the client's browser. For example, `https://example.com/` |

documents/registerEmandate.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ instance.customers.create({
66
"name": "Gaurav Kumar",
77
"contact": 9123456780,
88
"email": "gaurav.kumar@example.com",
9-
"fail_existing": 0,
9+
"fail_existing": "1",
1010
"gstin": "29XAbbA4369J1PA",
1111
"notes": {
1212
"notes_key_1": "Tea, Earl Grey, Hot",
@@ -21,7 +21,7 @@ instance.customers.create({
2121
| name* | string | Name of the customer |
2222
| email | string | Email of the customer |
2323
| contact | string | Contact number of the customer |
24-
| 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`|
24+
| 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`|
2525
| notes | object | A key-value pair |
2626

2727
**Response:**
@@ -126,8 +126,8 @@ instance.subscriptions.createRegistrationLink({
126126
},
127127
"receipt": "Receipt no. 1",
128128
"expire_by": 1880480689,
129-
"sms_notify": 1,
130-
"email_notify": 1,
129+
"sms_notify": true,
130+
"email_notify": true,
131131
"notes": {
132132
"note_key 1": "Beam me up Scotty",
133133
"note_key 2": "Tea. Earl Gray. Hot."
@@ -146,8 +146,8 @@ instance.subscriptions.createRegistrationLink({
146146
| description* | string | A brief description of the payment. |
147147
| subscription_registration | object | All keys listed [here](https://razorpay.com/docs/api/recurring-payments/emandate/auto-debit/#121-create-a-registration-link) are supported |
148148
| receipt | string | Your system order reference id. |
149-
| sms_notify | boolean | SMS notifications are to be sent by Razorpay (default : 1) |
150-
| email_notify | boolean | Email notifications are to be sent by Razorpay (default : 1) |
149+
| sms_notify | boolean | SMS notifications are to be sent by Razorpay (default : true) |
150+
| email_notify | boolean | Email notifications are to be sent by Razorpay (default : true) |
151151
| expire_by | integer | The timestamp, in Unix format, till when the customer can make the authorization payment. |
152152
| notes | object | A key-value pair |
153153

@@ -213,7 +213,7 @@ instance.payments.createRecurringPayment({
213213
"order_id": "order_1Aa00000000002",
214214
"customer_id": "cust_1Aa00000000001",
215215
"token": "token_1Aa00000000001",
216-
"recurring": "1",
216+
"recurring": true,
217217
"description": "Creating recurring payment for Gaurav Kumar",
218218
"notes": {
219219
"note_key 1": "Beam me up Scotty",
@@ -232,7 +232,7 @@ instance.payments.createRecurringPayment({
232232
| orderId* | string | The id of the order to be fetched |
233233
| customerId* | string | The id of the customer to be fetched |
234234
| tokenId* | string | The id of the token to be fetched |
235-
| recurring* | boolean | Possible values is `0` or `1` |
235+
| recurring* | boolean | Possible values is `true` or `false` |
236236
| description | string | A brief description of the payment. |
237237
| notes | object | A key-value pair |
238238

0 commit comments

Comments
 (0)