-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node-sdk Documentation #233
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
77c7ce7
replace wiki to md documentation
ankitdas13 5fb8c68
documents updated
ankitdas13 27b8404
settlement doc update
ankitdas13 502d44b
update settlement
ankitdas13 e4cd249
remove supported resources duplicacy
ankitdas13 bdcbebe
added payment verfication readme
ankitdas13 b34d798
add item readme link
ankitdas13 9c53a9c
spelling mistake correction
ankitdas13 1adcbaf
readme typo correction
ankitdas13 54fd09d
revert paymentlink changes
ankitdas13 26988f0
remove php code and bold text
ankitdas13 ad6529d
paymentlink readme syntax correction & remove php code
ankitdas13 404b4c3
remove php variable, update function & description
ankitdas13 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,175 @@ | ||
## Addons | ||
|
||
### Create an addon | ||
|
||
```js | ||
instance.subscriptions.createAddon('sub_I55auG9GnbsR8u',{ | ||
item:{ | ||
name:"Extra appala (papadum)", | ||
amount:30000, | ||
currency:"INR", | ||
description:"1 extra oil fried appala with meals" | ||
}, | ||
quantity:2 | ||
}) | ||
``` | ||
|
||
**Parameters:** | ||
|
||
| Name | Type | Description | | ||
|-------|-----------|--------------------------------------------------| | ||
| subscriptionId* | boolean | The subscription ID to which the add-on is being added. | | ||
| items* | object | Details of the add-on you want to create. | | ||
| quantity* | integer | This specifies the number of units of the add-on to be charged to the customer. | | ||
|
||
**Response:** | ||
```json | ||
{ | ||
"id":"ao_00000000000001", | ||
"entity":"addon", | ||
"item":{ | ||
"id":"item_00000000000001", | ||
"active":true, | ||
"name":"Extra appala (papadum)", | ||
"description":"1 extra oil fried appala with meals", | ||
"amount":30000, | ||
"unit_amount":30000, | ||
"currency":"INR", | ||
"type":"addon", | ||
"unit":null, | ||
"tax_inclusive":false, | ||
"hsn_code":null, | ||
"sac_code":null, | ||
"tax_rate":null, | ||
"tax_id":null, | ||
"tax_group_id":null, | ||
"created_at":1581597318, | ||
"updated_at":1581597318 | ||
}, | ||
"quantity":2, | ||
"created_at":1581597318, | ||
"subscription_id":"sub_00000000000001", | ||
"invoice_id":null | ||
} | ||
``` | ||
------------------------------------------------------------------------------------------------------- | ||
|
||
### Fetch all addons | ||
|
||
```js | ||
instance.addons.all(options) | ||
``` | ||
|
||
**Parameters:** | ||
|
||
| Name | Type | Description | | ||
|-------|-----------|--------------------------------------------------| | ||
| from | timestamp | timestamp after which the payments were created | | ||
| to | timestamp | timestamp before which the payments were created | | ||
| count | integer | number of payments to fetch (default: 10) | | ||
| skip | integer | number of payments to be skipped (default: 0) | | ||
|
||
**Response:** | ||
```json | ||
{ | ||
"entity": "collection", | ||
"count": 1, | ||
"items": [ | ||
{ | ||
"id": "ao_00000000000002", | ||
"entity": "addon", | ||
"item": { | ||
"id": "item_00000000000002", | ||
"active": true, | ||
"name": "Extra sweet", | ||
"description": "1 extra sweet of the day with meals", | ||
"amount": 90000, | ||
"unit_amount": 90000, | ||
"currency": "INR", | ||
"type": "addon", | ||
"unit": null, | ||
"tax_inclusive": false, | ||
"hsn_code": null, | ||
"sac_code": null, | ||
"tax_rate": null, | ||
"tax_id": null, | ||
"tax_group_id": null, | ||
"created_at": 1581597318, | ||
"updated_at": 1581597318 | ||
}, | ||
"quantity": 1, | ||
"created_at": 1581597318, | ||
"subscription_id": "sub_00000000000001", | ||
"invoice_id": "inv_00000000000001" | ||
} | ||
] | ||
} | ||
``` | ||
------------------------------------------------------------------------------------------------------- | ||
|
||
### Fetch an addon | ||
|
||
```js | ||
instance.addons.fetch(addonId) | ||
``` | ||
|
||
**Parameters:** | ||
|
||
| Name | Type | Description | | ||
|-----------------|---------|------------------------------------| | ||
| addonId* | string | addon id to be fetched | | ||
|
||
**Response:** | ||
HancilSequeira marked this conversation as resolved.
Show resolved
Hide resolved
|
||
```json | ||
{ | ||
"id":"ao_00000000000001", | ||
"entity":"addon", | ||
"item":{ | ||
"id":"item_00000000000001", | ||
"active":true, | ||
"name":"Extra appala (papadum)", | ||
"description":"1 extra oil fried appala with meals", | ||
"amount":30000, | ||
"unit_amount":30000, | ||
"currency":"INR", | ||
"type":"addon", | ||
"unit":null, | ||
"tax_inclusive":false, | ||
"hsn_code":null, | ||
"sac_code":null, | ||
"tax_rate":null, | ||
"tax_id":null, | ||
"tax_group_id":null, | ||
"created_at":1581597318, | ||
"updated_at":1581597318 | ||
}, | ||
"quantity":2, | ||
"created_at":1581597318, | ||
"subscription_id":"sub_00000000000001", | ||
"invoice_id":null | ||
} | ||
``` | ||
------------------------------------------------------------------------------------------------------- | ||
|
||
### Delete an addon | ||
|
||
```js | ||
instance.addons.delete(addonId) | ||
``` | ||
|
||
**Parameters:** | ||
|
||
| Name | Type | Description | | ||
|-----------------|---------|------------------------------------------------------------------------------| | ||
| addonId* | string | addon id to be deleted | | ||
|
||
**Response:** | ||
```json | ||
[] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be this |
||
``` | ||
------------------------------------------------------------------------------------------------------- | ||
|
||
**PN: * indicates mandatory fields** | ||
<br> | ||
<br> | ||
**For reference click [here](https://razorpay.com/docs/api/subscriptions/#add-ons)** |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not able view this file