-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d7f0aeb
commit 277f49b
Showing
6 changed files
with
378 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -863,6 +863,259 @@ Razorpay::Iin.fetch(tokenIin); | |
} | ||
``` | ||
------------------------------------------------------------------------------------------------------- | ||
------------------------------------------------------------------------------------------------------- | ||
|
||
### Fetch a Payment (With Expanded EMI Details) | ||
|
||
```rb | ||
Razorpay::Payment.expand_details("pay_XXXXXXXXXXXXXX",{"expand[]": "emi"}) | ||
``` | ||
|
||
**Parameters:** | ||
|
||
| Name | Type | Description | | ||
|-------------|---------|------------------------------------------------------------------| | ||
| paymentId* | integer | Unique identifier of the payment | | ||
| expand[] | string | Use to expand the `emi` details when the payment method is emi. | | ||
|
||
**Response:** <br> | ||
|
||
```json | ||
{ | ||
"id": "pay_DG4ZdRK8ZnXC3k", | ||
"entity": "payment", | ||
"amount": 200000, | ||
"currency": "INR", | ||
"status": "authorized", | ||
"order_id": null, | ||
"invoice_id": null, | ||
"international": false, | ||
"method": "emi", | ||
"amount_refunded": 0, | ||
"refund_status": null, | ||
"captured": false, | ||
"description": null, | ||
"card_id": "card_DG4ZdUO3xABb20", | ||
"bank": "ICIC", | ||
"wallet": null, | ||
"vpa": null, | ||
"email": "[email protected]", | ||
"contact": "+919972000005", | ||
"notes": [], | ||
"fee": null, | ||
"tax": null, | ||
"error_code": null, | ||
"error_description": null, | ||
"error_source": null, | ||
"error_step": null, | ||
"error_reason": null, | ||
"emi": { | ||
"issuer": "ICIC", | ||
"rate": 1300, | ||
"duration": 6 | ||
}, | ||
"acquirer_data": { | ||
"auth_code": "828553" | ||
}, | ||
"created_at": 1568026077 | ||
} | ||
``` | ||
------------------------------------------------------------------------------------------------------- | ||
|
||
### Fetch a Payment (With Expanded Card Details) | ||
|
||
```rb | ||
Razorpay::Payment.expand_details("pay_XXXXXXXXXXXXXX", {"expand[]": "card"}) | ||
``` | ||
|
||
**Parameters:** | ||
|
||
| Name | Type | Description | | ||
|-------------|---------|---------------------------------------------------------------------| | ||
| paymentId* | integer | Unique identifier of the payment | | ||
| expand[] | string | Use to expand the card details when the payment method is `card`. | | ||
|
||
**Response:** <br> | ||
|
||
```json | ||
{ | ||
"id": "pay_H9oR0gLCaVlV6m", | ||
"entity": "payment", | ||
"amount": 100, | ||
"currency": "INR", | ||
"status": "failed", | ||
"order_id": "order_H9o58N6qmLYQKC", | ||
"invoice_id": null, | ||
"terminal_id": "term_G5kJnYM9GhhLYT", | ||
"international": false, | ||
"method": "card", | ||
"amount_refunded": 0, | ||
"refund_status": null, | ||
"captured": false, | ||
"description": null, | ||
"card_id": "card_H9oR0ocen1cmZq", | ||
"card": { | ||
"id": "card_H9oR0ocen1cmZq", | ||
"entity": "card", | ||
"name": "Gaurav", | ||
"last4": "1213", | ||
"network": "RuPay", | ||
"type": "credit", | ||
"issuer": "UTIB", | ||
"international": false, | ||
"emi": false, | ||
"sub_type": "business" | ||
}, | ||
"bank": null, | ||
"wallet": null, | ||
"vpa": null, | ||
"email": "[email protected]", | ||
"contact": "+919000090000", | ||
"notes": { | ||
"email": "[email protected]", | ||
"phone": "09000090000" | ||
}, | ||
"fee": null, | ||
"tax": null, | ||
"error_code": "BAD_REQUEST_ERROR", | ||
"error_description": "Card issuer is invalid", | ||
"error_source": "customer", | ||
"error_step": "payment_authentication", | ||
"error_reason": "incorrect_card_details", | ||
"acquirer_data": { | ||
"auth_code": null, | ||
"authentication_reference_number": "100222021120200000000742753928" | ||
}, | ||
"created_at": 1620807547 | ||
} | ||
``` | ||
|
||
------------------------------------------------------------------------------------------------------- | ||
|
||
### Fetch a Payment (With Expanded Offers Details) | ||
|
||
```rb | ||
Razorpay::Payment.expand_details("pay_XXXXXXXXXXXXXX", {"expand[]": "offers"}) | ||
``` | ||
|
||
**Parameters:** | ||
|
||
| Name | Type | Description | | ||
|-------------|---------|----------------------------------------------------------------| | ||
| paymentId* | integer | Unique identifier of the payment | | ||
| expand[] | string | Use to expand the offers applied to a payment. | | ||
|
||
**Response:** <br> | ||
|
||
```json | ||
{ | ||
"id": "pay_G8VaL2Z68LRtDs", | ||
"entity": "payment", | ||
"amount": 900, | ||
"currency": "INR", | ||
"status": "captured", | ||
"order_id": "order_G8VXfKDWDEOHHd", | ||
"invoice_id": null, | ||
"international": false, | ||
"method": "netbanking", | ||
"amount_refunded": 0, | ||
"refund_status": null, | ||
"captured": true, | ||
"offers": { | ||
"entity": "collection", | ||
"count": 1, | ||
"items": [ | ||
{ | ||
"id": "offer_G8VXOp0qNuEXzh" | ||
} | ||
] | ||
}, | ||
"description": "Purchase Shoes", | ||
"card_id": null, | ||
"bank": "KKBK", | ||
"wallet": null, | ||
"vpa": null, | ||
"email": "[email protected]", | ||
"contact": "+919000090000", | ||
"customer_id": "cust_DitrYCFtCIokBO", | ||
"notes": [], | ||
"fee": 22, | ||
"tax": 4, | ||
"error_code": null, | ||
"error_description": null, | ||
"error_source": null, | ||
"error_step": null, | ||
"error_reason": null, | ||
"acquirer_data": { | ||
"bank_transaction_id": "0125836177", | ||
"authentication_reference_number": "100222021120200000000742753928" | ||
}, | ||
"created_at": 1606985740 | ||
} | ||
``` | ||
|
||
------------------------------------------------------------------------------------------------------- | ||
|
||
### Fetch a Payment (With Expanded UPI Details) | ||
|
||
```rb | ||
Razorpay::Payment.expand_details("pay_XXXXXXXXXXXXXX", {"expand[]": "upi"}) | ||
``` | ||
|
||
**Parameters:** | ||
|
||
| Name | Type | Description | | ||
|-------------|---------|---------------------------------------------------------------| | ||
| paymentId* | integer | Unique identifier of the payment | | ||
| expand[] | string | Use to expand the UPI details when the payment method is upi. | | ||
|
||
**Response:** <br> | ||
|
||
```json | ||
{ | ||
"id": "pay_DG4ZdRK8ZnXC3k", | ||
"entity": "payment", | ||
"amount": 100, | ||
"currency": "INR", | ||
"status": "captured", | ||
"order_id": "order_GjCr5oKh4AVC51", | ||
"invoice_id": null, | ||
"international": false, | ||
"method": "upi", | ||
"amount_refunded": 0, | ||
"refund_status": null, | ||
"captured": true, | ||
"description": "Payment for Adidas shoes", | ||
"card_id": null, | ||
"bank": null, | ||
"wallet": null, | ||
"vpa": "gaurav.kumar@upi", | ||
"email": "[email protected]", | ||
"contact": "9000090000", | ||
"customer_id": "cust_K6fNE0WJZWGqtN", | ||
"token_id": "token_KOdY$DBYQOv08n", | ||
"notes": [], | ||
"fee": 1, | ||
"tax": 0, | ||
"error_code": null, | ||
"error_description": null, | ||
"error_source": null, | ||
"error_step": null, | ||
"error_reason": null, | ||
"acquirer_data": { | ||
"rrn": "303107535132" | ||
}, | ||
"created_at": 1605871409, | ||
"upi": { | ||
"payer_account_type": "credit_card", | ||
"vpa": "gaurav.kumar@upi", | ||
"flow": "in_app" // appears only for Turbo UPI Payments. | ||
} | ||
} | ||
``` | ||
|
||
------------------------------------------------------------------------------------------------------- | ||
|
||
**PN: * indicates mandatory fields** | ||
<br> | ||
<br> | ||
|
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,38 @@ | ||
{ | ||
"id": "fake_payment_id", | ||
"entity": "payment", | ||
"amount": 200000, | ||
"currency": "INR", | ||
"status": "authorized", | ||
"order_id": null, | ||
"invoice_id": null, | ||
"international": false, | ||
"method": "emi", | ||
"amount_refunded": 0, | ||
"refund_status": null, | ||
"captured": false, | ||
"description": null, | ||
"card_id": "card_DG4ZdUO3xABb20", | ||
"bank": "ICIC", | ||
"wallet": null, | ||
"vpa": null, | ||
"email": "[email protected]", | ||
"contact": "+919972000005", | ||
"notes": [], | ||
"fee": null, | ||
"tax": null, | ||
"error_code": null, | ||
"error_description": null, | ||
"error_source": null, | ||
"error_step": null, | ||
"error_reason": null, | ||
"emi": { | ||
"issuer": "ICIC", | ||
"rate": 1300, | ||
"duration": 6 | ||
}, | ||
"acquirer_data": { | ||
"auth_code": "828553" | ||
}, | ||
"created_at": 1568026077 | ||
} |
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,50 @@ | ||
{ | ||
"id": "fake_payment_id", | ||
"entity": "payment", | ||
"amount": 100, | ||
"currency": "INR", | ||
"status": "failed", | ||
"order_id": "order_H9o58N6qmLYQKC", | ||
"invoice_id": null, | ||
"terminal_id": "term_G5kJnYM9GhhLYT", | ||
"international": false, | ||
"method": "card", | ||
"amount_refunded": 0, | ||
"refund_status": null, | ||
"captured": false, | ||
"description": null, | ||
"card_id": "card_H9oR0ocen1cmZq", | ||
"card": { | ||
"id": "card_H9oR0ocen1cmZq", | ||
"entity": "card", | ||
"name": "Gaurav", | ||
"last4": "1213", | ||
"network": "RuPay", | ||
"type": "credit", | ||
"issuer": "UTIB", | ||
"international": false, | ||
"emi": false, | ||
"sub_type": "business" | ||
}, | ||
"bank": null, | ||
"wallet": null, | ||
"vpa": null, | ||
"email": "[email protected]", | ||
"contact": "+919000090000", | ||
"notes": { | ||
"email": "[email protected]", | ||
"phone": "09000090000" | ||
}, | ||
"fee": null, | ||
"tax": null, | ||
"error_code": "BAD_REQUEST_ERROR", | ||
"error_description": "Card issuer is invalid", | ||
"error_source": "customer", | ||
"error_step": "payment_authentication", | ||
"error_reason": "incorrect_card_details", | ||
"acquirer_data": { | ||
"auth_code": null, | ||
"authentication_reference_number": "100222021120200000000742753928" | ||
}, | ||
"created_at": 1620807547 | ||
} |
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,10 @@ | ||
{ | ||
"error": { | ||
"code": "BAD_REQUEST_ERROR", | ||
"description": "The id provided does not exist", | ||
"source": "business", | ||
"step": "payment_initiation", | ||
"reason": "input_validation_failed", | ||
"metadata": {} | ||
} | ||
} |
Oops, something went wrong.