Skip to content

Commit 912da6a

Browse files
authored
Merge pull request #193 from razorpay/doc_api_correction
Doc api correction
2 parents 0352f2d + da7e26c commit 912da6a

32 files changed

+1670
-750
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format
44

55
## Unreleased
66

7+
## [1.3.1][1.3.1] - 2022-07-01
8+
9+
- Added Third party validation & Otp API for Payment (createUpi, validateVpa, otpGenerate, otpSubmit, otpResend)
10+
- Update Documention
11+
712
## [1.3.0][1.3.0] - 2022-02-01
813

914
### Added

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ that both app title and version are strings.
4343

4444
- [Token](documents/token.md)
4545

46+
- [Fund](documents/fund.md)
47+
4648
- [Order](documents/order.md)
4749

4850
- [Payments](documents/payment.md)

documents/addon.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ client.subscription.createAddon('sub_I55auG9GnbsR8u',{
1919
| Name | Type | Description |
2020
|-------|-----------|--------------------------------------------------|
2121
| subscriptionId* | boolean | The subscription ID to which the add-on is being added. |
22-
| items* | object | Details of the add-on you want to create. |
23-
| quantity* | integer | This specifies the number of units of the add-on to be charged to the customer. |
22+
| items | array | All parameters listed [here](https://razorpay.com/docs/api/payments/subscriptions/#create-an-add-on) |
23+
| quantity | integer | This specifies the number of units of the add-on to be charged to the customer. |
2424

2525
**Response:**
2626
```json

documents/card.md

Lines changed: 50 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,20 @@ client.customer.create({
4646

4747
```py
4848
client.order.create({
49-
"amount": 50000,
50-
"currency": "INR",
51-
"receipt": "receipt#1",
52-
"notes": {
53-
"key1": "value3",
54-
"key2": "value2"
55-
}
49+
"amount":100,
50+
"currency":"INR",
51+
"customer_id":"cust_4xbQrmEoA5WJ01",
52+
"method":"card",
53+
"token":{
54+
"max_amount":5000,
55+
"expire_at":2709971120,
56+
"frequency":"monthly"
57+
},
58+
"receipt":"Receipt No. 1",
59+
"notes":{
60+
"notes_key_1":"Tea, Earl Grey, Hot",
61+
"notes_key_2":"Tea, Earl Grey... decaf."
62+
}
5663
})
5764
```
5865

@@ -62,24 +69,35 @@ client.order.create({
6269
|-----------------|---------|------------------------------------------------------------------------------|
6370
| amount* | integer | The amount to be captured (should be equal to the authorized amount, in paise) |
6471
| currency* | string | The currency of the payment (defaults to INR) |
72+
| customerId* | string | The id of the customer to be fetched |
6573
| receipt | string | Your system order reference id. |
74+
| method* | string | Payment method used to make the registration transaction. Possible value is `card`. |
75+
| token | object | All keys listed [here](https://razorpay.com/docs/api/recurring-payments/cards/authorization-transaction/#112-create-an-order) are supported |
6676
| notes | object | A key-value pair |
6777

6878
**Response:**
6979
```json
7080
{
71-
"id": "order_EKwxwAgItmmXdp",
81+
"id": "order_JmugUU7mFbXTRN",
7282
"entity": "order",
73-
"amount": 50000,
83+
"amount": 100,
7484
"amount_paid": 0,
75-
"amount_due": 50000,
85+
"amount_due": 100,
7686
"currency": "INR",
77-
"receipt": "receipt#1",
87+
"receipt": "Receipt No. 1",
7888
"offer_id": null,
7989
"status": "created",
8090
"attempts": 0,
81-
"notes": [],
82-
"created_at": 1582628071
91+
"notes": {
92+
"notes_key_1": "Tea, Earl Grey, Hot",
93+
"notes_key_2": "Tea, Earl Grey... decaf."
94+
},
95+
"created_at": 1656418993,
96+
"token": {
97+
"max_amount": 5000,
98+
"expire_at": 2709971120
99+
},
100+
"method": "card"
83101
}
84102
```
85103
-------------------------------------------------------------------------------------------------------
@@ -117,8 +135,7 @@ client.registration_link.create({
117135

118136
| Name | Type | Description |
119137
|-----------------|---------|------------------------------------------------------------------------------|
120-
| customer | object | Details of the customer to whom the registration link will be sent. |
121-
| type* | string | the value is `link`. |
138+
| customer | object | All keys listed [here](https://razorpay.com/docs/api/recurring-payments/cards/authorization-transaction/#121-create-a-registration-link) are supported |
122139
| amount* | integer | The amount to be captured (should be equal to the authorized amount, in paise) |
123140
| currency* | string | The currency of the payment (defaults to INR) |
124141
| description* | string | A brief description of the payment. |
@@ -216,7 +233,7 @@ client.order.create({
216233
| amount* | integer | The amount to be captured (should be equal to the authorized amount, in paise) |
217234
| currency* | string | The currency of the payment (defaults to INR) |
218235
| customerId* | string | The id of the customer to be fetched |
219-
| method* | string | Payment method used to make the registration transaction. Possible value is `card`. |
236+
| method | string | Payment method used to make the registration transaction. Possible value is `card`. |
220237
| receipt | string | Your system order reference id. |
221238
| 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 |
222239
| notes | array | A key-value pair |
@@ -515,8 +532,24 @@ client.card.fetch(cardId)
515532

516533
| Name | Type | Description |
517534
|-----------------|---------|------------------------------------------------------------------------------|
518-
| cardId* | string | card id to be fetched |
535+
| cardId* | string | card id to be fetched |
519536

537+
**Response:**
538+
```json
539+
{
540+
"id": "card_JXPULjlKqC5j0i",
541+
"entity": "card",
542+
"name": "Gaurav",
543+
"last4": "4366",
544+
"network": "Visa",
545+
"type": "credit",
546+
"issuer": "UTIB",
547+
"international": false,
548+
"emi": true,
549+
"sub_type": "consumer",
550+
"token_iin": null
551+
}
552+
```
520553
-------------------------------------------------------------------------------------------------------
521554

522555
## Delete tokens

documents/customer.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ client.customer.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`|
26+
| gstin | string | Customer's GST number, if available. For example, 29XAbbA4369J1PA |
2527
| notes | object | A key-value pair |
2628

2729
**Response:**
@@ -88,8 +90,8 @@ client.customer.all(options)
8890

8991
| Name | Type | Description |
9092
|---------------|-------------|---------------------------------------------|
91-
| count | integer | number of payments to fetch (default: 10) |
92-
| skip | integer | number of payments to be skipped (default: 0) |
93+
| count | integer | number of customers to fetch (default: 10) |
94+
| skip | integer | number of customers to be skipped (default: 0) |
9395

9496
**Response:**
9597
```json

documents/emandate.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ client.customer.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`|
2526
| notes | object | A key-value pair |
2627

2728
**Response:**
@@ -48,12 +49,13 @@ client.customer.create({
4849
client.order.create({
4950
"amount": 0,
5051
"currency": "INR",
52+
"payment_capture": True,
5153
"method": "emandate",
5254
"customer_id": "cust_1Aa00000000001",
5355
"receipt": "Receipt No. 1",
5456
"notes": {
5557
"notes_key_1": "Beam me up Scotty",
56-
"notes_key_2": "Engage"
58+
"notes_key_2": "Engage"
5759
},
5860
"token": {
5961
"auth_type": "netbanking",
@@ -81,11 +83,14 @@ client.order.create({
8183
| currency* | string | Currency of the order. Currently only `INR` is supported. |
8284
| method* | string | The authorization method. In this case the value will be `emandate` |
8385
| receipt | string | Your system order reference id. |
86+
| customer_id* | string | The `customer_id` for the customer you want to charge.|
87+
| 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. |
8488
| notes | object | A key-value pair |
85-
| token | object | A key-value pair |
89+
| token | array | All parameters listed [here](https://razorpay.com/docs/api/payments/recurring-payments/emandate/create-authorization-transaction/#112-create-an-order) are supported|
8690

8791
**Response:**
8892
Create order response please click [here](https://razorpay.com/docs/api/recurring-payments/emandate/authorization-transaction/#112-create-an-order)
93+
8994
-------------------------------------------------------------------------------------------------------
9095

9196
### Create an Authorization Payment
@@ -134,16 +139,20 @@ client.registration_link.create({
134139

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

145153
**Response:**
146154
Create registration link response please click [here](https://razorpay.com/docs/api/recurring-payments/emandate/authorization-transaction/#121-create-a-registration-link)
155+
147156
-------------------------------------------------------------------------------------------------------
148157

149158
### Send/Resend notifications
@@ -369,6 +378,7 @@ client.token.delete(customerId,tokenId)
369378
client.order.create({
370379
"amount":1000,
371380
"currency":"INR",
381+
"payment_capture": True,
372382
"receipt":"Receipt No. 1",
373383
"notes": {
374384
"notes_key_1":"Tea, Earl Grey, Hot",
@@ -385,6 +395,7 @@ client.order.create({
385395
| currency* | string | Currency of the order. Currently only `INR` is supported. |
386396
| receipt | string | Your system order reference id. |
387397
| notes | object | A key-value pair |
398+
| 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. |
388399

389400
**Response:**
390401
```json
@@ -440,8 +451,8 @@ client.payment.createRecurring({
440451
| customer_id* | string | The `customer_id` for the customer you want to charge. |
441452
| 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`.|
442453
| recurring* | string | Determines if recurring payment is enabled or not. Possible values:<br>* `1` - Recurring is enabled.* `0` - Recurring is not enabled.|
443-
| description* | string | A user-entered description for the payment.|
444-
| 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. |
454+
| description | string | A user-entered description for the payment.|
455+
| 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. |
445456

446457
**Response:**
447458
```json

documents/fund.md

Lines changed: 51 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -19,31 +19,33 @@ client.fund_account.create({
1919
|---------------|-------------|---------------------------------------------|
2020
| customerId* | string | The id of the customer to be fetched |
2121
| account_type* | string | The bank_account to be linked to the customer ID |
22-
| bank_account* | object | A key-value pair |
22+
| bank_account* | object | All keys listed [here](https://razorpay.com/docs/payments/customers/customer-fund-account-api/#create-a-fund-account) are supported |
2323

2424
**Response:**
2525
```json
2626
{
27-
"id":"fa_Aa00000000001",
28-
"entity":"fund_account",
29-
"customer_id":"cust_Aa000000000001",
30-
"account_type":"bank_account",
31-
"bank_account":{
32-
"name":"Gaurav Kumar",
33-
"account_number":"11214311215411",
34-
"ifsc":"HDFC0000053",
35-
"bank_name":"HDFC Bank"
27+
"id": "fa_JexSeA2SS1S19D",
28+
"entity": "fund_account",
29+
"customer_id": "cust_JdumbHq5F3kKu6",
30+
"account_type": "bank_account",
31+
"bank_account": {
32+
"ifsc": "HDFC0000053",
33+
"bank_name": "HDFC Bank",
34+
"name": "Gaurav Kumar",
35+
"notes": [],
36+
"account_number": "11214311215411"
3637
},
37-
"active":true,
38-
"created_at":1543650891
38+
"batch_id": null,
39+
"active": true,
40+
"created_at": 1654682051
3941
}
4042
```
4143
-------------------------------------------------------------------------------------------------------
4244

4345
### Fetch all fund accounts
4446

4547
```py
46-
client.fund_account.fetch(customerId)
48+
client.fund_account.all({"customer_id":customerId})
4749
```
4850

4951
**Parameters:**
@@ -55,18 +57,42 @@ client.fund_account.fetch(customerId)
5557
**Response:**
5658
```json
5759
{
58-
"id":"fa_Aa00000000001",
59-
"entity":"fund_account",
60-
"customer_id":"cust_Aa000000000001",
61-
"account_type":"bank_account",
62-
"bank_account":{
63-
"name":"Gaurav Kumar",
64-
"account_number":"11214311215411",
65-
"ifsc":"HDFC0000053",
66-
"bank_name":"HDFC Bank"
67-
},
68-
"active":true,
69-
"created_at":1543650891
60+
"entity": "collection",
61+
"count": 2,
62+
"items": [
63+
{
64+
"id": "fa_JcXaLomo4ck5IY",
65+
"entity": "fund_account",
66+
"customer_id": "cust_JZse2vlC5nK9AQ",
67+
"account_type": "bank_account",
68+
"bank_account": {
69+
"ifsc": "HDFC0000053",
70+
"bank_name": "HDFC Bank",
71+
"name": "Gaurav Kumar",
72+
"notes": [],
73+
"account_number": "11214311215411"
74+
},
75+
"batch_id": null,
76+
"active": true,
77+
"created_at": 1654154246
78+
},
79+
{
80+
"id": "fa_JcXYtecLkhW74k",
81+
"entity": "fund_account",
82+
"customer_id": "cust_JZse2vlC5nK9AQ",
83+
"account_type": "bank_account",
84+
"bank_account": {
85+
"ifsc": "HDFC0000053",
86+
"bank_name": "HDFC Bank",
87+
"name": "Gaurav Kumar",
88+
"notes": [],
89+
"account_number": "11214311215411"
90+
},
91+
"batch_id": null,
92+
"active": true,
93+
"created_at": 1654154163
94+
}
95+
]
7096
}
7197
```
7298
-------------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)