razorpay 3.0.1 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +2 -2
- data/CHANGELOG.md +13 -0
- data/README.md +4 -0
- data/documents/account.md +449 -0
- data/documents/card.md +45 -0
- data/documents/payment.md +44 -1
- data/documents/productConfiguration.md +444 -0
- data/documents/stakeholder.md +334 -0
- data/documents/tokens.md +146 -1
- data/documents/webhook.md +224 -0
- data/lib/razorpay/account.rb +39 -0
- data/lib/razorpay/addon.rb +1 -1
- data/lib/razorpay/card.rb +4 -0
- data/lib/razorpay/constants.rb +2 -2
- data/lib/razorpay/iin.rb +15 -0
- data/lib/razorpay/order.rb +1 -1
- data/lib/razorpay/product.rb +37 -0
- data/lib/razorpay/request.rb +16 -16
- data/lib/razorpay/stakeholder.rb +39 -0
- data/lib/razorpay/token.rb +28 -0
- data/lib/razorpay/virtual_account.rb +1 -1
- data/lib/razorpay/webhook.rb +50 -0
- data/lib/razorpay.rb +6 -0
- data/test/fixtures/fake_account.json +78 -0
- data/test/fixtures/fake_card_reference.json +5 -0
- data/test/fixtures/fake_iin_token.json +23 -0
- data/test/fixtures/fake_product.json +138 -0
- data/test/fixtures/fake_stakeholder.json +29 -0
- data/test/fixtures/fake_tokenise_customer.json +40 -0
- data/test/fixtures/fake_webhook.json +79 -0
- data/test/fixtures/fake_webhook_by_account_id.json +22 -0
- data/test/fixtures/fetch_tnc.json +11 -0
- data/test/fixtures/stakeholder_collection.json +35 -0
- data/test/fixtures/webhook_by_account_collection.json +35 -0
- data/test/fixtures/webhook_collection.json +85 -0
- data/test/razorpay/test_account.rb +134 -0
- data/test/razorpay/test_card.rb +6 -0
- data/test/razorpay/test_customer.rb +8 -8
- data/test/razorpay/test_iin.rb +23 -0
- data/test/razorpay/test_order.rb +1 -1
- data/test/razorpay/test_product.rb +67 -0
- data/test/razorpay/test_settlement.rb +1 -1
- data/test/razorpay/test_stakeholder.rb +87 -0
- data/test/razorpay/test_token.rb +66 -0
- data/test/razorpay/test_transfer.rb +1 -1
- data/test/razorpay/test_webhook.rb +132 -0
- metadata +47 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c28a35f404b325fc0728618fb47732be4c0d37a59ba3fbc5cb60fed4ed4b3d89
|
4
|
+
data.tar.gz: 560ce32cd8d54fed25ed614b02135feb185780dcd3b3d37ffafaffe5b3e6c9e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aedf371db7bcc4dca051a85c937565f02bf117968562577bda35eb45613905ad104bb6a81d914eaf1fa8f9ec74148052aa44a2d9deabd30fd35694f9407e67d8
|
7
|
+
data.tar.gz: 9c96522ec5323027f4fdb6d7aa9e1339c3e690eac33bfc2e6f7c72a9ec5fe8ea5d8f3c7517fe9102d9490635ecccc35129cc98415b318d6a61d8c780790a187a
|
data/.github/workflows/ci.yml
CHANGED
@@ -53,7 +53,7 @@ jobs:
|
|
53
53
|
files: ${{ github.workspace }}/coverage/coverage.xml
|
54
54
|
publish:
|
55
55
|
name: Publish
|
56
|
-
|
56
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
57
57
|
needs: [build, test]
|
58
58
|
runs-on: ubuntu-latest
|
59
59
|
steps:
|
@@ -76,4 +76,4 @@ jobs:
|
|
76
76
|
printf -- "---\n:rubygems_api_key: ${GEM_API_KEY}\n" > $HOME/.gem/credentials
|
77
77
|
gem push gems/*.gem
|
78
78
|
env:
|
79
|
-
GEM_API_KEY: ${{secrets.GEM_API_KEY}}
|
79
|
+
GEM_API_KEY: ${{secrets.GEM_API_KEY}}
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,19 @@ Changelog for Razorpay-Ruby SDK.
|
|
4
4
|
|
5
5
|
## Unreleased
|
6
6
|
|
7
|
+
## [3.1.0] - 2023-10-13
|
8
|
+
|
9
|
+
### Added
|
10
|
+
|
11
|
+
feat: Added new API endpoints
|
12
|
+
|
13
|
+
Added account onboarding API create, fetch, edit, delete
|
14
|
+
Added stakeholders API create, fetch, all, edit
|
15
|
+
Added product configuration API request_product_configuration, fetch, edit, fetch_tnc
|
16
|
+
Added webhooks API create, fetch, all, edit, delete
|
17
|
+
Added Documents API upload_account_doc, fetch_account_doc, upload_stakeholder_doc, fetch_stakeholder_doc
|
18
|
+
Added token sharing API create, fetch, delete, process_payment_on_alternate_pa_or_pg
|
19
|
+
|
7
20
|
## [3.0.1] - 2022-07-11
|
8
21
|
|
9
22
|
### Added
|
data/README.md
CHANGED
@@ -43,6 +43,7 @@ You can find your API keys at <https://dashboard.razorpay.com/#/app/keys>.
|
|
43
43
|
If you are using rails, the right place to do this might be `config/initializers/razorpay.rb`.
|
44
44
|
|
45
45
|
## Supported Resources
|
46
|
+
- [Account](documents/account.md)
|
46
47
|
- [Customer](documents/customer.md)
|
47
48
|
- [Token](documents/tokens.md)
|
48
49
|
- [Order](documents/order.md)
|
@@ -56,7 +57,9 @@ If you are using rails, the right place to do this might be `config/initializers
|
|
56
57
|
- [Subscriptions](documents/subscriptions.md)
|
57
58
|
- [Add-on](documents/addon.md)
|
58
59
|
- [Payment Links](documents/paymentLink.md)
|
60
|
+
- [Product Configuration](documents/productConfiguration.md)
|
59
61
|
- [Smart Collect](documents/virtualAccount.md)
|
62
|
+
- [Stakeholder](documents/stakeholder.md)
|
60
63
|
- [Transfer](documents/transfers.md)
|
61
64
|
- [QR Code](documents/qrcode.md)
|
62
65
|
- [Emandate](documents/emandate.md)
|
@@ -66,6 +69,7 @@ If you are using rails, the right place to do this might be `config/initializers
|
|
66
69
|
- [Register Emandate and Charge First Payment Together](documents/registerEmandate.md)
|
67
70
|
- [Register NACH and Charge First Payment Together](documents/registerNach.md)
|
68
71
|
- [Payment Verification](documents/paymentVerification.md)
|
72
|
+
- [Webhook](documents/webhook.md)
|
69
73
|
## Development
|
70
74
|
|
71
75
|
- Everything is namespaced under the Razorpay module
|
@@ -0,0 +1,449 @@
|
|
1
|
+
## Account
|
2
|
+
|
3
|
+
```rb
|
4
|
+
require "razorpay"
|
5
|
+
|
6
|
+
Razorpay.setup('key_id', 'key_secret')
|
7
|
+
```
|
8
|
+
|
9
|
+
### Create an Account
|
10
|
+
```rb
|
11
|
+
Razorpay::Account.create({
|
12
|
+
"email": "gauriagain.kumar@example.org",
|
13
|
+
"phone": "9000090000",
|
14
|
+
"legal_business_name": "Acme Corp",
|
15
|
+
"business_type": "partnership",
|
16
|
+
"customer_facing_business_name": "Example",
|
17
|
+
"profile": {
|
18
|
+
"category": "healthcare",
|
19
|
+
"subcategory": "clinic",
|
20
|
+
"description": "Healthcare E-commerce platform",
|
21
|
+
"addresses": {
|
22
|
+
"operation": {
|
23
|
+
"street1": "507, Koramangala 6th block",
|
24
|
+
"street2": "Kormanagala",
|
25
|
+
"city": "Bengaluru",
|
26
|
+
"state": "Karnataka",
|
27
|
+
"postal_code": 560047,
|
28
|
+
"country": "IN"
|
29
|
+
},
|
30
|
+
"registered": {
|
31
|
+
"street1": "507, Koramangala 1st block",
|
32
|
+
"street2": "MG Road",
|
33
|
+
"city": "Bengaluru",
|
34
|
+
"state": "Karnataka",
|
35
|
+
"postal_code": 560034,
|
36
|
+
"country": "IN"
|
37
|
+
}
|
38
|
+
},
|
39
|
+
"business_model": "Online Clothing ( men, women, ethnic, modern ) fashion and lifestyle, accessories, t-shirt, shirt, track pant, shoes."
|
40
|
+
},
|
41
|
+
"legal_info": {
|
42
|
+
"pan": "AAACL1234C",
|
43
|
+
"gst": "18AABCU9603R1ZM"
|
44
|
+
},
|
45
|
+
"brand": {
|
46
|
+
"color": "FFFFFF"
|
47
|
+
},
|
48
|
+
"notes": {
|
49
|
+
"internal_ref_id": "123123"
|
50
|
+
},
|
51
|
+
"contact_name": "Gaurav Kumar",
|
52
|
+
"contact_info": {
|
53
|
+
"chargeback": {
|
54
|
+
"email": "cb@example.org"
|
55
|
+
},
|
56
|
+
"refund": {
|
57
|
+
"email": "cb@example.org"
|
58
|
+
},
|
59
|
+
"support": {
|
60
|
+
"email": "support@example.org",
|
61
|
+
"phone": "9999999998",
|
62
|
+
"policy_url": "https://www.google.com"
|
63
|
+
}
|
64
|
+
},
|
65
|
+
"apps": {
|
66
|
+
"websites": [
|
67
|
+
"https://www.example.org"
|
68
|
+
],
|
69
|
+
"android": [
|
70
|
+
{
|
71
|
+
"url": "playstore.example.org",
|
72
|
+
"name": "Example"
|
73
|
+
}
|
74
|
+
],
|
75
|
+
"ios": [
|
76
|
+
{
|
77
|
+
"url": "appstore.example.org",
|
78
|
+
"name": "Example"
|
79
|
+
}
|
80
|
+
]
|
81
|
+
}
|
82
|
+
})
|
83
|
+
```
|
84
|
+
|
85
|
+
**Parameters:**
|
86
|
+
|
87
|
+
| Name | Type | Description |
|
88
|
+
|---------------|-------------|---------------------------------------------|
|
89
|
+
| email* | string | The sub-merchant's business email address. |
|
90
|
+
| phone* | integer | The sub-merchant's business phone number. The minimum length is 8 characters and the maximum length is 15. |
|
91
|
+
| legal_business_name* | string | The name of the sub-merchant's business. For example, Acme Corp. The minimum length is 4 characters and the maximum length is 200. |
|
92
|
+
| customer_facing_business_name | string | The sub-merchant billing label as it appears on the Razorpay Dashboard. The minimum length is 1 character and the maximum length is 255. |
|
93
|
+
| business_type | string | The type of business operated by the sub-merchant.Possible value is `proprietorship`, `partnership`, `private_limited`, `public_limited`, `llp`, `ngo`, `trust`, `society`, `not_yet_registered`, `huf` |
|
94
|
+
| reference_id | string | Partner's external account reference id. The minimum length is 1 character and the maximum length is 512. |
|
95
|
+
| profile | object | All keys listed [here](https://razorpay.com/docs/api/partners/account-onboarding/#create-an-account) are supported |
|
96
|
+
| legal_info | object | All keys listed [here](hhttps://razorpay.com/docs/api/partners/account-onboarding/#create-an-account) are supported |
|
97
|
+
| brand | object | All keys listed [here](https://razorpay.com/docs/api/partners/account-onboarding/#create-an-account) are supported |
|
98
|
+
| notes | object | A key-value pair |
|
99
|
+
| contact_name* | string | The name of the contact. The minimum length is 4 and the maximum length is 255 characters. |
|
100
|
+
| contact_info | object | All keys listed [here](https://razorpay.com/docs/api/partners/account-onboarding/#create-an-account) are supported |
|
101
|
+
| apps | object | All keys listed [here](https://razorpay.com/docs/api/partners/account-onboarding/#create-an-account) are supported |
|
102
|
+
|
103
|
+
|
104
|
+
**Response:**
|
105
|
+
```json
|
106
|
+
{
|
107
|
+
"id": "acc_GRWKk7qQsLnDjX",
|
108
|
+
"type": "standard",
|
109
|
+
"status": "created",
|
110
|
+
"email": "gauriagain.kumar@example.org",
|
111
|
+
"profile": {
|
112
|
+
"category": "healthcare",
|
113
|
+
"subcategory": "clinic",
|
114
|
+
"addresses": {
|
115
|
+
"registered": {
|
116
|
+
"street1": "507, Koramangala 1st block",
|
117
|
+
"street2": "MG Road",
|
118
|
+
"city": "Bengaluru",
|
119
|
+
"state": "KARNATAKA",
|
120
|
+
"postal_code": 560034,
|
121
|
+
"country": "IN"
|
122
|
+
},
|
123
|
+
"operation": {
|
124
|
+
"street1": "507, Koramangala 6th block",
|
125
|
+
"street2": "Kormanagalo",
|
126
|
+
"city": "Bengaluru",
|
127
|
+
"state": "KARNATAKA",
|
128
|
+
"country": "IN",
|
129
|
+
"postal_code": 560047
|
130
|
+
}
|
131
|
+
},
|
132
|
+
"business_model": "Online Clothing ( men, women, ethnic, modern ) fashion and lifestyle, accessories, t-shirt, shirt, track pant, shoes."
|
133
|
+
},
|
134
|
+
"notes": {
|
135
|
+
"internal_ref_id": "123123"
|
136
|
+
},
|
137
|
+
"created_at": 1611136837,
|
138
|
+
"phone": "9000090000",
|
139
|
+
"business_type": "partnership",
|
140
|
+
"legal_business_name": "Acme Corp",
|
141
|
+
"customer_facing_business_name": "Example",
|
142
|
+
"legal_info": {
|
143
|
+
"pan": "AAACL1234C",
|
144
|
+
"gst": "18AABCU9603R1ZM"
|
145
|
+
},
|
146
|
+
"apps": {
|
147
|
+
"websites": [
|
148
|
+
"https://www.example.org"
|
149
|
+
],
|
150
|
+
"android": [
|
151
|
+
{
|
152
|
+
"url": "playstore.example.org",
|
153
|
+
"name": "Example"
|
154
|
+
}
|
155
|
+
],
|
156
|
+
"ios": [
|
157
|
+
{
|
158
|
+
"url": "appstore.example.org",
|
159
|
+
"name": "Example"
|
160
|
+
}
|
161
|
+
]
|
162
|
+
},
|
163
|
+
"brand": {
|
164
|
+
"color": "#FFFFFF"
|
165
|
+
},
|
166
|
+
"contact_info": {
|
167
|
+
"chargeback": {
|
168
|
+
"email": "cb@example.org",
|
169
|
+
"phone": null,
|
170
|
+
"policy_url": null
|
171
|
+
},
|
172
|
+
"refund": {
|
173
|
+
"email": "cb@example.org",
|
174
|
+
"phone": null,
|
175
|
+
"policy_url": null
|
176
|
+
},
|
177
|
+
"support": {
|
178
|
+
"email": "support@example.org",
|
179
|
+
"phone": "9999999998",
|
180
|
+
"policy_url": "https://www.google.com"
|
181
|
+
}
|
182
|
+
}
|
183
|
+
}
|
184
|
+
```
|
185
|
+
|
186
|
+
-------------------------------------------------------------------------------------------------------
|
187
|
+
|
188
|
+
### Edit Account
|
189
|
+
|
190
|
+
```rb
|
191
|
+
accountId = "acc_GP4lfNA0iIMn5B";
|
192
|
+
|
193
|
+
Razorpay::Account.edit(accountId,{
|
194
|
+
"customer_facing_business_name": "ABCD Ltd"
|
195
|
+
})
|
196
|
+
```
|
197
|
+
|
198
|
+
**Parameters:**
|
199
|
+
|
200
|
+
| Name | Type | Description |
|
201
|
+
|---------------|-------------|---------------------------------------------|
|
202
|
+
| phone | integer | The sub-merchant's business phone number. The minimum length is 8 characters and the maximum length is 15. |
|
203
|
+
| legal_business_name | string | The name of the sub-merchant's business. For example, Acme Corp. The minimum length is 4 characters and the maximum length is 200. |
|
204
|
+
| customer_facing_business_name | string | The sub-merchant billing label as it appears on the Razorpay Dashboard. The minimum length is 1 character and the maximum length is 255. |
|
205
|
+
| profile | object | All keys listed [here](https://razorpay.com/docs/api/partners/account-onboarding/#update-an-account) are supported |
|
206
|
+
| legal_info | object | All keys listed [here](hhttps://razorpay.com/docs/api/partners/account-onboarding/#update-an-account) are supported |
|
207
|
+
| brand | object | All keys listed [here](https://razorpay.com/docs/api/partners/account-onboarding/#update-an-account) are supported |
|
208
|
+
| notes | object | A key-value pair |
|
209
|
+
| contact_name* | string | The name of the contact. The minimum length is 4 and the maximum length is 255 characters. |
|
210
|
+
| contact_info | object | All keys listed [here](https://razorpay.com/docs/api/partners/account-onboarding/#update-an-account) are supported |
|
211
|
+
| apps | object | All keys listed [here](https://razorpay.com/docs/api/partners/account-onboarding/#update-an-account) are supported |
|
212
|
+
|
213
|
+
**Response:**
|
214
|
+
```json
|
215
|
+
{
|
216
|
+
"id": "acc_GP4lfNA0iIMn5B",
|
217
|
+
"type": "standard",
|
218
|
+
"status": "created",
|
219
|
+
"email": "gauri@example.org",
|
220
|
+
"profile": {
|
221
|
+
"category": "healthcare",
|
222
|
+
"subcategory": "clinic",
|
223
|
+
"addresses": {
|
224
|
+
"registered": {
|
225
|
+
"street1": "507, Koramangala 1st block",
|
226
|
+
"street2": "MG Road-1",
|
227
|
+
"city": "Bengalore",
|
228
|
+
"state": "KARNATAKA",
|
229
|
+
"postal_code": "560034",
|
230
|
+
"country": "IN"
|
231
|
+
}
|
232
|
+
}
|
233
|
+
},
|
234
|
+
"notes": [],
|
235
|
+
"created_at": 1610603081,
|
236
|
+
"phone": "9000090000",
|
237
|
+
"reference_id": "randomId",
|
238
|
+
"business_type": "partnership",
|
239
|
+
"legal_business_name": "Acme Corp",
|
240
|
+
"customer_facing_business_name": "ABCD Ltd"
|
241
|
+
}
|
242
|
+
```
|
243
|
+
-------------------------------------------------------------------------------------------------------
|
244
|
+
|
245
|
+
### Delete an account
|
246
|
+
```rb
|
247
|
+
accountId = "acc_GP4lfNA0iIMn5B";
|
248
|
+
|
249
|
+
Razorpay::Account.delete(accountId)
|
250
|
+
```
|
251
|
+
|
252
|
+
**Parameters:**
|
253
|
+
|
254
|
+
| Name | Type | Description |
|
255
|
+
|---------------|-------------|---------------------------------------------|
|
256
|
+
| accountId* | string | The unique identifier of a sub-merchant account that must be deleted. |
|
257
|
+
|
258
|
+
**Response:**
|
259
|
+
```json
|
260
|
+
{
|
261
|
+
"id": "acc_GXQAkO2MrvBYg4",
|
262
|
+
"type": "standard",
|
263
|
+
"status": "suspended",
|
264
|
+
"email": "gaurav.kumar@acme.org",
|
265
|
+
"profile": {
|
266
|
+
"category": "healthcare",
|
267
|
+
"subcategory": "clinic",
|
268
|
+
"addresses": {
|
269
|
+
"registered": {
|
270
|
+
"street1": "507, Koramangala 1st block",
|
271
|
+
"street2": "MG Road",
|
272
|
+
"city": "Bengaluru",
|
273
|
+
"state": "KARNATAKA",
|
274
|
+
"postal_code": "560034",
|
275
|
+
"country": "IN"
|
276
|
+
},
|
277
|
+
"operation": {
|
278
|
+
"street1": "507, Koramangala 1st block",
|
279
|
+
"street2": "MG Road",
|
280
|
+
"city": "Bengaluru",
|
281
|
+
"state": "KARNATAKA",
|
282
|
+
"country": "IN",
|
283
|
+
"postal_code": "560034"
|
284
|
+
}
|
285
|
+
},
|
286
|
+
"business_model": "Online Clothing ( men, women, ethnic, modern ) fashion and lifestyle, accessories, t-shirt, shirt, track pant, shoes."
|
287
|
+
},
|
288
|
+
"notes": {
|
289
|
+
"internal_ref_id": "123123"
|
290
|
+
},
|
291
|
+
"created_at": 1612425180,
|
292
|
+
"suspended_at": 1612425235,
|
293
|
+
"phone": "9000090000",
|
294
|
+
"reference_id": "account_COdeRandom",
|
295
|
+
"business_type": "partnership",
|
296
|
+
"legal_business_name": "Acme Corp Pvt Ltd",
|
297
|
+
"customer_facing_business_name": "Acme",
|
298
|
+
"legal_info": {
|
299
|
+
"pan": "AAACL1234C",
|
300
|
+
"gst": "18AABCU9603R1ZM"
|
301
|
+
},
|
302
|
+
"apps": {
|
303
|
+
"websites": [
|
304
|
+
"https://www.acme.org"
|
305
|
+
],
|
306
|
+
"android": [
|
307
|
+
{
|
308
|
+
"url": "playstore.acme.org",
|
309
|
+
"name": "Acme"
|
310
|
+
}
|
311
|
+
],
|
312
|
+
"ios": [
|
313
|
+
{
|
314
|
+
"url": "appstore.acme.org",
|
315
|
+
"name": "Acme"
|
316
|
+
}
|
317
|
+
]
|
318
|
+
},
|
319
|
+
"brand": {
|
320
|
+
"color": "#FFFFFF"
|
321
|
+
},
|
322
|
+
"contact_name": "Gaurav Kumar",
|
323
|
+
"contact_info": {
|
324
|
+
"chargeback": {
|
325
|
+
"email": "cb@acme.org",
|
326
|
+
"phone": "9000090000",
|
327
|
+
"policy_url": "https://www.google.com"
|
328
|
+
},
|
329
|
+
"refund": {
|
330
|
+
"email": "cb@acme.org",
|
331
|
+
"phone": "9898989898",
|
332
|
+
"policy_url": "https://www.google.com"
|
333
|
+
},
|
334
|
+
"support": {
|
335
|
+
"email": "support@acme.org",
|
336
|
+
"phone": "9898989898",
|
337
|
+
"policy_url": "https://www.google.com"
|
338
|
+
}
|
339
|
+
}
|
340
|
+
}
|
341
|
+
```
|
342
|
+
|
343
|
+
-------------------------------------------------------------------------------------------------------
|
344
|
+
|
345
|
+
### Fetch an account
|
346
|
+
```rb
|
347
|
+
accountId = "acc_GP4lfNA0iIMn5B";
|
348
|
+
|
349
|
+
Razorpay::Account.fetch(accountId)
|
350
|
+
```
|
351
|
+
|
352
|
+
**Parameters:**
|
353
|
+
|
354
|
+
| Name | Type | Description |
|
355
|
+
|-------------|-------------|---------------------------------------------|
|
356
|
+
| accountId* | string | The unique identifier of a sub-merchant account generated by Razorpay. |
|
357
|
+
|
358
|
+
**Response:**
|
359
|
+
```json
|
360
|
+
{
|
361
|
+
"id": "acc_GP4lfNA0iIMn5B",
|
362
|
+
"type": "standard",
|
363
|
+
"status": "created",
|
364
|
+
"email": "gauri@example.org",
|
365
|
+
"profile": {
|
366
|
+
"category": "healthcare",
|
367
|
+
"subcategory": "clinic",
|
368
|
+
"addresses": {
|
369
|
+
"registered": {
|
370
|
+
"street1": "507, Koramangala 1st block",
|
371
|
+
"street2": "MG Road-1",
|
372
|
+
"city": "Bengalore",
|
373
|
+
"state": "KARNATAKA",
|
374
|
+
"postal_code": "560034",
|
375
|
+
"country": "IN"
|
376
|
+
}
|
377
|
+
}
|
378
|
+
},
|
379
|
+
"notes": [],
|
380
|
+
"created_at": 1610603081,
|
381
|
+
"phone": "9000090000",
|
382
|
+
"reference_id": "randomId",
|
383
|
+
"business_type": "partnership",
|
384
|
+
"legal_business_name": "Acme Corp",
|
385
|
+
"customer_facing_business_name": "Example Pvt. Ltd."
|
386
|
+
}
|
387
|
+
```
|
388
|
+
-------------------------------------------------------------------------------------------------------
|
389
|
+
### Upload account documents
|
390
|
+
```rb
|
391
|
+
account_id = "acc_0000000000001"
|
392
|
+
|
393
|
+
Razorpay::Account.upload_account_doc(account_id,{
|
394
|
+
"file": File.new("/Users/your_name/Downloads/sample_uploaded.jpeg"),
|
395
|
+
"document_type": "business_proof_url"
|
396
|
+
})
|
397
|
+
|
398
|
+
```
|
399
|
+
|
400
|
+
**Parameters:**
|
401
|
+
|
402
|
+
| Name | Type | Description |
|
403
|
+
|-------------|-------------|---------------------------------------------|
|
404
|
+
| accountId* | string | The unique identifier of a sub-merchant account generated by Razorpay. |
|
405
|
+
| file* | string | The URL generated once the business proof document is uploaded. |
|
406
|
+
| document_type* | string | The documents valid for the proof type to be shared. Possible values : <br> business_proof_of_identification: `shop_establishment_certificate`, `gst_certificate`, `msme_certificate`, `business_proof_url`, `business_pan_url`, <br><br> additional_documents : `form_12_a_url`, `form_80g_url`, `cancelled_cheque` |
|
407
|
+
|
408
|
+
**Response:**
|
409
|
+
```json
|
410
|
+
{
|
411
|
+
"business_proof_of_identification": [
|
412
|
+
{
|
413
|
+
"type": "business_proof_url",
|
414
|
+
"url": "<https://rzp.io/i/bzDKbNg>"
|
415
|
+
}
|
416
|
+
]
|
417
|
+
}
|
418
|
+
```
|
419
|
+
-------------------------------------------------------------------------------------------------------
|
420
|
+
|
421
|
+
### Fetch account documents
|
422
|
+
```rb
|
423
|
+
account_id = "acc_0000000000001"
|
424
|
+
|
425
|
+
Razorpay::Account.fetch_account_doc(account_id)
|
426
|
+
```
|
427
|
+
|
428
|
+
**Parameters:**
|
429
|
+
|
430
|
+
| Name | Type | Description |
|
431
|
+
|-------------|-------------|---------------------------------------------|
|
432
|
+
| accountId* | string | The unique identifier of a sub-merchant account generated by Razorpay. |
|
433
|
+
|
434
|
+
**Response:**
|
435
|
+
```json
|
436
|
+
{
|
437
|
+
"business_proof_of_identification": [
|
438
|
+
{
|
439
|
+
"type": "business_proof_url",
|
440
|
+
"url": "<https://rzp.io/i/bzDKbNg>"
|
441
|
+
}
|
442
|
+
]
|
443
|
+
}
|
444
|
+
```
|
445
|
+
-------------------------------------------------------------------------------------------------------
|
446
|
+
**PN: * indicates mandatory fields**
|
447
|
+
<br>
|
448
|
+
<br>
|
449
|
+
**For reference click [here](https://razorpay.com/docs/api/partners/account-onboarding/)**
|
data/documents/card.md
CHANGED
@@ -602,6 +602,51 @@ Razorpay::Card.fetch(cardId)
|
|
602
602
|
"token_iin": null
|
603
603
|
}
|
604
604
|
```
|
605
|
+
-------------------------------------------------------------------------------------------------------
|
606
|
+
## Using Card Number/ Tokenised Card Number
|
607
|
+
|
608
|
+
```rb
|
609
|
+
Razorpay::Card.request_card_reference({"number":"4111111111111111"});
|
610
|
+
```
|
611
|
+
**Parameters:**
|
612
|
+
|
613
|
+
| Name | Type | Description |
|
614
|
+
|-------------|---------|------------------------------------------------------------------------------|
|
615
|
+
| number* | string | The card number whose PAR or network reference id should be retrieved. |
|
616
|
+
| tokenised | string | Determines if the card is saved as a token. Possible value is `true` or `false` |
|
617
|
+
|
618
|
+
**Response:**
|
619
|
+
```json
|
620
|
+
{
|
621
|
+
"network": "Visa",
|
622
|
+
"payment_account_reference": "V0010013819231376539033235990",
|
623
|
+
"network_reference_id": null
|
624
|
+
}
|
625
|
+
```
|
626
|
+
-------------------------------------------------------------------------------------------------------
|
627
|
+
|
628
|
+
## Using Razporpay token
|
629
|
+
|
630
|
+
```rb
|
631
|
+
Razorpay::Card.requestCardReference({"token":"token_4lsdksD31GaZ09"});
|
632
|
+
```
|
633
|
+
**Parameters:**
|
634
|
+
|
635
|
+
| Name | Type | Description |
|
636
|
+
|-------------|---------|------------------------------------------------------------------------------|
|
637
|
+
| token* | string | The token whose PAR or network reference id should be retrieved.|
|
638
|
+
|
639
|
+
|
640
|
+
|
641
|
+
**Response:**
|
642
|
+
```json
|
643
|
+
{
|
644
|
+
"network": "Visa",
|
645
|
+
"payment_account_reference": "V0010013819231376539033235990",
|
646
|
+
"network_reference_id": null
|
647
|
+
}
|
648
|
+
```
|
649
|
+
|
605
650
|
-------------------------------------------------------------------------------------------------------
|
606
651
|
|
607
652
|
**PN: * indicates mandatory fields**
|
data/documents/payment.md
CHANGED
@@ -816,10 +816,53 @@ Razorpay::PaymentMethods.all()
|
|
816
816
|
**Response:** <br>
|
817
817
|
please refer this [doc](https://razorpay.com/docs/payments/third-party-validation/s2s-integration/methods-api/#fetch-payment-methods) for response
|
818
818
|
|
819
|
-
|
819
|
+
|
820
820
|
-------------------------------------------------------------------------------------------------------
|
821
821
|
|
822
|
+
### Token IIN API
|
823
|
+
|
824
|
+
```rb
|
825
|
+
tokenIin = "412345";
|
826
|
+
|
827
|
+
Razorpay::Iin.fetch(tokenIin);
|
828
|
+
```
|
829
|
+
|
830
|
+
**Parameters:**
|
831
|
+
|
832
|
+
| Name | Type | Description |
|
833
|
+
|------------|--------|-----------------------------------|
|
834
|
+
| tokenIin* | string | The token IIN. |
|
822
835
|
|
836
|
+
**Response:**
|
837
|
+
```json
|
838
|
+
{
|
839
|
+
"iin": "412345",
|
840
|
+
"entity": "iin",
|
841
|
+
"network": "Visa",
|
842
|
+
"type": "credit",
|
843
|
+
"sub_type": "business",
|
844
|
+
"issuer_code": "HDFC",
|
845
|
+
"issuer_name": "HDFC Bank Ltd",
|
846
|
+
"international": false,
|
847
|
+
"is_tokenized": true,
|
848
|
+
"card_iin": "411111",
|
849
|
+
"emi":{
|
850
|
+
"available": true
|
851
|
+
},
|
852
|
+
"recurring": {
|
853
|
+
"available": true
|
854
|
+
},
|
855
|
+
"authentication_types": [
|
856
|
+
{
|
857
|
+
"type":"3ds"
|
858
|
+
},
|
859
|
+
{
|
860
|
+
"type":"otp"
|
861
|
+
}
|
862
|
+
]
|
863
|
+
}
|
864
|
+
```
|
865
|
+
-------------------------------------------------------------------------------------------------------
|
823
866
|
**PN: * indicates mandatory fields**
|
824
867
|
<br>
|
825
868
|
<br>
|