Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions documents/payment.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ client.payment.capture(paymentId,{
|-----------|---------|--------------------------------------------------------------------------------|
| paymentId* | string | Id of the payment to capture |
| amount* | integer | The amount to be captured (should be equal to the authorized amount, in paise) |
| currency | string | The currency of the payment (defaults to INR) |
| currency* | string | The currency of the payment (defaults to INR) |

**Response:**
```json
Expand Down Expand Up @@ -127,6 +127,7 @@ client.payment.fetch(paymentId)
| Name | Type | Description |
|------------|--------|-----------------------------------|
| paymentId* | string | Id of the payment to be retrieved |
| expand[] | string | Used to retrieve additional information about the payment. Possible value is `card`, `offers` or `emi`|

**Response:**
```json
Expand Down Expand Up @@ -259,6 +260,7 @@ client.payment.edit(paymentId,{
"wallet": null,
"vpa": null,
"email": "testme@acme.com",
"customer_id": "cust_JR4BVKjKyJ7enk",
"notes": {
"key1": "value1",
"key2": "value2"
Expand Down Expand Up @@ -312,24 +314,25 @@ client.payment.fetchCardDetails(paymentId)
**Response:**
```json
{
"id": "card_6krZ6bcjoeqyV9",
"id": "card_JXPULjlKqC5j0i",
"entity": "card",
"name": "Gaurav",
"last4": "3335",
"name": "gaurav",
"last4": "4366",
"network": "Visa",
"type": "debit",
"issuer": "SBIN",
"type": "credit",
"issuer": "UTIB",
"international": false,
"emi": null,
"sub_type": "business"
"emi": true,
"sub_type": "consumer",
"token_iin": null
}
```
-------------------------------------------------------------------------------------------------------

### Fetch Payment Downtime Details

```py
client.payment.fetchPaymentDowntime()
client.payment.fetchDownTime()
```
**Response:** <br>
For payment downtime response please click [here](https://razorpay.com/docs/api/payments/downtime/#fetch-payment-downtime-details)
Expand Down
232 changes: 81 additions & 151 deletions documents/settlement.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,154 +65,13 @@ client.settlement.fetch(settlementId)
```
-------------------------------------------------------------------------------------------------------

### Settlement report for a month

```py
client.settlement.report({
year: 2020,
month: 9
})
```

**Parameters:**

| Name | Type | Description |
|---------------|-------------|---------------------------------------------|
| year* | integer | The year the settlement was received in the `YYYY` format. For example, `2020` |
| month* | integer | The month the settlement was received in the `MM` format. For example, `09` |
| day | integer | The date the settlement was received in the `DD` format. For example, `01` |
| count | integer | number of settlements to fetch (default: 10) |
| skip | integer | number of settlements to be skipped (default: 0) |

**Response:**
```json
{
"entity": "collection",
"count": 4,
"items": [
{
"entity_id": "pay_DEXrnipqTmWVGE",
"type": "payment",
"debit": 0,
"credit": 97100,
"amount": 100000,
"currency": "INR",
"fee": 2900,
"tax": 0,
"on_hold": false,
"settled": true,
"created_at": 1567692556,
"settled_at": 1568176960,
"settlement_id": "setl_DGlQ1Rj8os78Ec",
"posted_at": null,
"credit_type": "default",
"description": "Recurring Payment via Subscription",
"notes": "{}",
"payment_id": null,
"settlement_utr": "1568176960vxp0rj",
"order_id": "order_DEXrnRiR3SNDHA",
"order_receipt": null,
"method": "card",
"card_network": "MasterCard",
"card_issuer": "KARB",
"card_type": "credit",
"dispute_id": null
},
{
"entity_id": "rfnd_DGRcGzZSLyEdg1",
"type": "refund",
"debit": 242500,
"credit": 0,
"amount": 242500,
"currency": "INR",
"fee": 0,
"tax": 0,
"on_hold": false,
"settled": true,
"created_at": 1568107224,
"settled_at": 1568176960,
"settlement_id": "setl_DGlQ1Rj8os78Ec",
"posted_at": null,
"credit_type": "default",
"description": null,
"notes": "{}",
"payment_id": "pay_DEXq1pACSqFxtS",
"settlement_utr": "1568176960vxp0rj",
"order_id": "order_DEXpmZgffXNvuI",
"order_receipt": null,
"method": "card",
"card_network": "MasterCard",
"card_issuer": "KARB",
"card_type": "credit",
"dispute_id": null
},
{
"entity_id": "trf_DEUoCEtdsJgvl7",
"type": "transfer",
"debit": 100296,
"credit": 0,
"amount": 100000,
"currency": "INR",
"fee": 296,
"tax": 46,
"on_hold": false,
"settled": true,
"created_at": 1567681786,
"settled_at": 1568176960,
"settlement_id": "setl_DGlQ1Rj8os78Ec",
"posted_at": null,
"credit_type": "default",
"description": null,
"notes": null,
"payment_id": "pay_DEApNNTR6xmqJy",
"settlement_utr": "1568176960vxp0rj",
"order_id": null,
"order_receipt": null,
"method": null,
"card_network": null,
"card_issuer": null,
"card_type": null,
"dispute_id": null
},
{
"entity_id": "adj_EhcHONhX4ChgNC",
"type": "adjustment",
"debit": 0,
"credit": 1012,
"amount": 1012,
"currency": "INR",
"fee": 0,
"tax": 0,
"on_hold": false,
"settled": true,
"created_at": 1567681786,
"settled_at": 1568176960,
"settlement_id": "setl_DGlQ1Rj8os78Ec",
"posted_at": null,
"description": "test reason",
"notes": null,
"payment_id": null,
"settlement_utr": null,
"order_id": null,
"order_receipt": null,
"method": null,
"card_network": null,
"card_issuer": null,
"card_type": null,
"dispute_id": null
}
]
}
```
-------------------------------------------------------------------------------------------------------

### Settlement recon

```py
client.settlement.report({
year: 2020,
month: 9,
day:11
"year": 2020,
"month": 9,
"day":11
})
```
**Parameters:**
Expand All @@ -222,6 +81,8 @@ client.settlement.report({
| year* | integer | The year the settlement was received in the `YYYY` format. For example, `2020` |
| month* | integer | The month the settlement was received in the `MM` format. For example, `09` |
| day | integer | The day the settlement was received in the `DD` format. For example, |
| count | integer | Specifies the number of available settlements to be fetched. |
| skip | integer | Specifies the number of available settlements to be skipped when fetching a count. |

**Response:**
```json
Expand Down Expand Up @@ -350,7 +211,7 @@ client.settlement.report({
```py
client.settlement.create_ondemand_settlement({
"amount": 1221,
"settle_full_balance": 0,
"settle_full_balance": false,
"description": "Testing",
"notes": {
"notes_key_1": "Tea, Earl Grey, Hot",
Expand Down Expand Up @@ -410,6 +271,9 @@ client.settlement.create_ondemand_settlement({
}
}
```

Create on-demand settlement please click [here](https://razorpay.com/docs/api/settlements/instant/#create-an-instant-settlement)

-------------------------------------------------------------------------------------------------------

### Fetch all on-demand settlements
Expand All @@ -421,13 +285,59 @@ client.settlement.fetch_all_ondemand_settlement(options)

| 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) |
| from | timestamp | timestamp after which the settlements were created |
| to | timestamp | timestamp before which the settlements were created |
| count | integer | number of settlements to fetch (default: 10) |
| skip | integer | number of settlements to be skipped (default: 0) |

**Response:**<br>
For all on-demand settlements response please click [here](https://razorpay.com/docs/api/settlements/#fetch-all-on-demand-settlements)

```json
{
"entity": "collection",
"count": 2,
"items": [
{
"id": "setlod_FNj7g2YS5J67Rz",
"entity": "settlement.ondemand",
"amount_requested": 200000,
"amount_settled": 199410,
"amount_pending": 0,
"amount_reversed": 0,
"fees": 590,
"tax": 90,
"currency": "INR",
"settle_full_balance": false,
"status": "processed",
"description": "Need this to make vendor payments.",
"notes": {
"notes_key_1": "Tea, Earl Grey, Hot",
"notes_key_2": "Tea, Earl Grey… decaf."
},
"created_at": 1596771429
},
{
"id": "setlod_FJOp0jOWlalIvt",
"entity": "settlement.ondemand",
"amount_requested": 300000,
"amount_settled": 299114,
"amount_pending": 0,
"amount_reversed": 0,
"fees": 886,
"tax": 136,
"currency": "INR",
"settle_full_balance": false,
"status": "processed",
"description": "Need this to buy stock.",
"notes": {
"notes_key_1": "Tea, Earl Grey, Hot",
"notes_key_2": "Tea, Earl Grey… decaf."
},
"created_at": 1595826576
}
]
}
```

-------------------------------------------------------------------------------------------------------

Expand All @@ -444,8 +354,28 @@ client.settlement.fetch_ondemand_settlement_id(settlementId)
| settlementId* | string | Settlement Id of the On-demand settlement|

**Response:**
For on-demand settlement by ID response please click [here](https://razorpay.com/docs/api/settlements/#fetch-on-demand-settlements-by-id)

```json
{
"id": "setlod_FNj7g2YS5J67Rz",
"entity": "settlement.ondemand",
"amount_requested": 200000,
"amount_settled": 199410,
"amount_pending": 0,
"amount_reversed": 0,
"fees": 590,
"tax": 90,
"currency": "INR",
"settle_full_balance": false,
"status": "processed",
"description": "Need this to make vendor payments.",
"notes": {
"notes_key_1": "Tea, Earl Grey, Hot",
"notes_key_2": "Tea, Earl Grey… decaf."
},
"created_at": 1596771429
}
```
-------------------------------------------------------------------------------------------------------

**PN: * indicates mandatory fields**
Expand Down