Skip to content
Merged
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
58 changes: 30 additions & 28 deletions documents/refund.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ client.payment.refund(paymentId,{
"notes_key_1": "Beam me up Scotty.",
"notes_key_2": "Engage"
},
"receipt": "Receipt No. 31"
"receipt": "#Receipt No. 131"
})
```

Expand All @@ -27,20 +27,24 @@ client.payment.refund(paymentId,{
**Response:**
```json
{
"id": "rfnd_FP8QHiV938haTz",
"id": "rfnd_JnzyQwYOOBNJJu",
"entity": "refund",
"amount": 500100,
"receipt": "Receipt No. 31",
"amount": 100,
"currency": "INR",
"payment_id": "pay_FCXKPFtYfPXJPy",
"notes": [],
"payment_id": "pay_JRSS9bMrRMds3w",
"notes": {
"notes_key_1": "Beam me up Scotty.",
"notes_key_2": "Engage"
},
"receipt": "#Receipt No. 131",
"acquirer_data": {
"arn": null
},
"created_at": 1597078866,
"created_at": 1656655960,
"batch_id": null,
"status": "processed",
"speed_processed": "normal"
"speed_processed": "normal",
"speed_requested": "normal"
}
```
-------------------------------------------------------------------------------------------------------
Expand All @@ -51,7 +55,7 @@ client.payment.refund(paymentId,{
client.payment.refund(paymentId,{
"amount": "100",
"speed": "optimum",
"receipt": "Receipt No. 31"
"receipt": "#Receipt No. 132"
})
```

Expand All @@ -67,22 +71,20 @@ client.payment.refund(paymentId,{
**Response:**
```json
{
"id": "rfnd_FP8R8EGjGbPkVb",
"id": "rfnd_Jo00DtIBzADMi6",
"entity": "refund",
"amount": 500100,
"amount": 100,
"currency": "INR",
"payment_id": "pay_FC8MmhMBZPKDHF",
"notes": {
"notes_key_1": "Tea, Earl Grey, Hot",
"notes_key_2": "Tea, Earl Grey… decaf."
},
"receipt": "Receipt No. 31",
"payment_id": "pay_JRP3Y66cNcf2qF",
"notes": [],
"receipt": "#Receipt No. 132",
"acquirer_data": {
"arn": null
},
"created_at": 1597078914,
"created_at": 1656656062,
"batch_id": null,
"status": "processed",
"status": "pending",
"speed_processed": "instant",
"speed_requested": "optimum"
}
```
Expand All @@ -99,10 +101,10 @@ client.payment.fetch_multiple_refund(paymentId,option)
| Name | Type | Description |
|-------|-----------|--------------------------------------------------|
| paymentId* | string | The id of the payment |
| 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 refunds were created |
| to | timestamp | timestamp before which the refunds were created |
| count | integer | number of refunds to fetch (default: 10) |
| skip | integer | number of refunds to be skipped (default: 0) |

**Refund:**
```json
Expand Down Expand Up @@ -179,10 +181,10 @@ client.refund.all(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 refunds were created |
| to | timestamp | timestamp before which the refunds were created |
| count | integer | number of refunds to fetch (default: 10) |
| skip | integer | number of refunds to be skipped (default: 0) |

**Response:**
```json
Expand Down Expand Up @@ -249,7 +251,7 @@ client.refund.fetch(refundId)

### Update the refund
```py
client.refund.edit({
client.refund.edit(refundId,{
"notes": {
"notes_key_1": "Beam me up Scotty.",
"notes_key_2": "Engage"
Expand Down