razorpay 3.0.0 → 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/pull_request_template.md +8 -0
- data/.github/workflows/ci.yml +79 -0
- data/CHANGELOG.md +21 -0
- data/README.md +5 -1
- data/documents/Invoice.md +11 -3
- data/documents/account.md +449 -0
- data/documents/addon.md +23 -1
- data/documents/card.md +73 -29
- data/documents/customer.md +2 -0
- data/documents/emandate.md +20 -12
- data/documents/fund.md +19 -17
- data/documents/items.md +65 -41
- data/documents/order.md +51 -0
- data/documents/papernach.md +40 -20
- data/documents/payment.md +247 -14
- data/documents/paymentLink.md +37 -19
- data/documents/plan.md +3 -3
- data/documents/productConfiguration.md +444 -0
- data/documents/qrcode.md +17 -19
- data/documents/refund.md +11 -10
- data/documents/registerEmandate.md +25 -18
- data/documents/registerNach.md +49 -57
- data/documents/settlement.md +1 -0
- data/documents/stakeholder.md +334 -0
- data/documents/subscriptions.md +3 -1
- data/documents/tokens.md +201 -2
- data/documents/transfers.md +292 -195
- data/documents/upi.md +25 -28
- data/documents/virtualAccount.md +18 -13
- data/documents/webhook.md +224 -0
- data/lib/razorpay/account.rb +39 -0
- data/lib/razorpay/addon.rb +5 -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/payment.rb +8 -0
- data/lib/razorpay/payment_method.rb +17 -0
- 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 +7 -0
- data/razorpay-ruby.gemspec +2 -1
- data/test/fixtures/fake_account.json +78 -0
- data/test/fixtures/fake_card_reference.json +5 -0
- data/test/fixtures/fake_create_upi_payment.json +3 -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_validate_vpa.json +5 -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/payment_methods_collection.json +149 -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_addon.rb +6 -2
- 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_payment.rb +46 -2
- 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
- data/test/test_helper.rb +2 -0
- metadata +76 -7
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
|
@@ -0,0 +1,8 @@
|
|
1
|
+
## Note :- Please follow the below points while attaching test cases document link below:
|
2
|
+
### - If label `Tested` is added then test cases document URL is mandatory.
|
3
|
+
### - Link added should be a valid URL and accessible throughout the org.
|
4
|
+
### - If the branch name contains hotfix / revert by default the BVT workflow check will pass.
|
5
|
+
|
6
|
+
| Test Case Document URL |
|
7
|
+
|-----------------------------------------------|
|
8
|
+
| Please paste test case document link here.... |
|
@@ -0,0 +1,79 @@
|
|
1
|
+
name: CI
|
2
|
+
on:
|
3
|
+
push:
|
4
|
+
branches:
|
5
|
+
- master
|
6
|
+
tags:
|
7
|
+
- v[0-9]+.[0-9]+.[0-9]+*
|
8
|
+
pull_request:
|
9
|
+
branches:
|
10
|
+
- master
|
11
|
+
jobs:
|
12
|
+
build:
|
13
|
+
name: Build
|
14
|
+
runs-on: ubuntu-latest
|
15
|
+
|
16
|
+
steps:
|
17
|
+
- uses: actions/checkout@v3
|
18
|
+
- name: Set up Ruby
|
19
|
+
uses: ruby/setup-ruby@v1
|
20
|
+
with:
|
21
|
+
ruby-version: 3.1
|
22
|
+
- name: Install dependencies
|
23
|
+
run: bundle install
|
24
|
+
- name: Build
|
25
|
+
run: gem build *.gemspec
|
26
|
+
- name: 'Upload Artifact'
|
27
|
+
uses: actions/upload-artifact@v3
|
28
|
+
with:
|
29
|
+
name: gems
|
30
|
+
path: '*.gem'
|
31
|
+
test:
|
32
|
+
runs-on: ubuntu-latest
|
33
|
+
needs: build
|
34
|
+
strategy:
|
35
|
+
matrix:
|
36
|
+
ruby-version: ['2.6', '2.7', '3.0', '3.1']
|
37
|
+
|
38
|
+
steps:
|
39
|
+
- name: Checkout
|
40
|
+
uses: actions/checkout@v2
|
41
|
+
- name: Set up Ruby latest
|
42
|
+
uses: ruby/setup-ruby@v1
|
43
|
+
with:
|
44
|
+
ruby-version: 3.1
|
45
|
+
- name: Install dependencies
|
46
|
+
run: bundle install
|
47
|
+
- name: Run tests and collect coverage
|
48
|
+
run: bundle exec rake
|
49
|
+
- name: Upload coverage to Codecov
|
50
|
+
if: ${{ matrix.ruby-version == 3.1 }}
|
51
|
+
uses: codecov/codecov-action@v3
|
52
|
+
with:
|
53
|
+
files: ${{ github.workspace }}/coverage/coverage.xml
|
54
|
+
publish:
|
55
|
+
name: Publish
|
56
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
57
|
+
needs: [build, test]
|
58
|
+
runs-on: ubuntu-latest
|
59
|
+
steps:
|
60
|
+
- uses: actions/checkout@v2
|
61
|
+
- run: sudo apt-get install -y oathtool
|
62
|
+
- name: Download all workflow run artifacts
|
63
|
+
uses: actions/download-artifact@v3
|
64
|
+
with:
|
65
|
+
name: gems
|
66
|
+
path: gems
|
67
|
+
- name: Set up Ruby
|
68
|
+
uses: ruby/setup-ruby@v1
|
69
|
+
with:
|
70
|
+
ruby-version: 3.1
|
71
|
+
- name: Publish gems to Rubygems
|
72
|
+
run: |
|
73
|
+
mkdir -p $HOME/.gem
|
74
|
+
touch $HOME/.gem/credentials
|
75
|
+
chmod 0600 $HOME/.gem/credentials
|
76
|
+
printf -- "---\n:rubygems_api_key: ${GEM_API_KEY}\n" > $HOME/.gem/credentials
|
77
|
+
gem push gems/*.gem
|
78
|
+
env:
|
79
|
+
GEM_API_KEY: ${{secrets.GEM_API_KEY}}
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,27 @@ 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
|
+
|
20
|
+
## [3.0.1] - 2022-07-11
|
21
|
+
|
22
|
+
### Added
|
23
|
+
|
24
|
+
- Added Third party validation API for Payments (create_upi, validate_vpa)
|
25
|
+
- New API for Payment Methods
|
26
|
+
- Doc Updated
|
27
|
+
|
7
28
|
## [3.0.0] - 2022-06-03
|
8
29
|
|
9
30
|
### Added
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Razorpay Ruby bindings
|
2
2
|
|
3
|
-
[](https://travis-ci.org/razorpay/razorpay-ruby) [](https://travis-ci.org/razorpay/razorpay-ruby) [](http://badge.fury.io/rb/razorpay) [](https://coveralls.io/github/Razorpay/razorpay-ruby?branch=master) [](http://doge.mit-license.org)
|
4
4
|
|
5
5
|
This is the base ruby gem for interacting with the Razorpay API. This is primarily meant for users who wish to perform interactions with the Razorpay API programatically.
|
6
6
|
|
@@ -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
|
data/documents/Invoice.md
CHANGED
@@ -67,8 +67,16 @@ Razorpay::Invoice.create({
|
|
67
67
|
|-----------------|---------|------------------------------------------------------------------------------|
|
68
68
|
|type* | string | entity type (here its invoice) |
|
69
69
|
|description | string | A brief description of the invoice. |
|
70
|
-
|customer_id | string | customer id for which invoice need be raised
|
71
|
-
|
|
70
|
+
|customer_id | string | customer id for which invoice need be raised |
|
71
|
+
|draft | string | Invoice is created in draft state when value is set to `1` |
|
72
|
+
| customer.name* | object | All parameters listed [here](https://razorpay.com/docs/api/payments/invoices/#create-an-invoice) are supported |
|
73
|
+
| line_items | object | All parameters listed [here](https://razorpay.com/docs/api/payments/invoices/#create-an-invoice) are supported |
|
74
|
+
|
75
|
+
|expire_by | object | Details of the line item that is billed in the invoice. |
|
76
|
+
|sms_notify | object | Details of the line item that is billed in the invoice. |
|
77
|
+
|email_notify | object | Details of the line item that is billed in the invoice. |
|
78
|
+
|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. |
|
79
|
+
| currency* | string | The currency of the payment (defaults to INR) |
|
72
80
|
|
73
81
|
**Response:**
|
74
82
|
For create invoice response please click [here](https://razorpay.com/docs/api/invoices/#create-an-invoice)
|
@@ -507,7 +515,7 @@ invoiceId = "inv_E7q0tqkxBRzdau"
|
|
507
515
|
|
508
516
|
medium = "email"
|
509
517
|
|
510
|
-
Razorpay::Invoice.
|
518
|
+
Razorpay::Invoice.notify_by(invoiceId,medium)
|
511
519
|
```
|
512
520
|
|
513
521
|
**Parameters:**
|
@@ -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/addon.md
CHANGED
@@ -28,7 +28,7 @@ Razorpay::Addon.create(subscriptionId,{
|
|
28
28
|
|-------|-----------|--------------------------------------------------|
|
29
29
|
| subscriptionId* | boolean | The subscription ID to which the add-on is being added. |
|
30
30
|
| items* | object | Details of the add-on you want to create. |
|
31
|
-
| quantity
|
31
|
+
| quantity | integer | This specifies the number of units of the add-on to be charged to the customer. |
|
32
32
|
|
33
33
|
**Response:**
|
34
34
|
```json
|
@@ -161,6 +161,28 @@ Razorpay::Addon.fetch(addonId)
|
|
161
161
|
"invoice_id":null
|
162
162
|
}
|
163
163
|
```
|
164
|
+
----------------------------------------------------------------------------------------------------
|
165
|
+
|
166
|
+
### Delete an addon
|
167
|
+
|
168
|
+
```rb
|
169
|
+
addonId = "ao_IrSY3UIqDRx7df"
|
170
|
+
|
171
|
+
Razorpay::Addon.delete(addonId)
|
172
|
+
```
|
173
|
+
|
174
|
+
|
175
|
+
**Parameters:**
|
176
|
+
|
177
|
+
| Name | Type | Description |
|
178
|
+
|-----------------|---------|------------------------------------------------------------------------------|
|
179
|
+
| addonId* | string | addon id to be deleted |
|
180
|
+
|
181
|
+
**Response:**
|
182
|
+
|
183
|
+
```json
|
184
|
+
[]
|
185
|
+
```
|
164
186
|
-------------------------------------------------------------------------------------------------------
|
165
187
|
|
166
188
|
**PN: * indicates mandatory fields**
|