From 27eb2edadc83f9012ca66cd421e25ef533816409 Mon Sep 17 00:00:00 2001 From: ankitdas13 Date: Tue, 14 Jun 2022 13:09:01 +0530 Subject: [PATCH 1/2] order doc correction --- documents/order.md | 98 +++++++++++++++++++++++++++------------------- 1 file changed, 58 insertions(+), 40 deletions(-) diff --git a/documents/order.md b/documents/order.md index 24ddfbe5..9cdb3bab 100644 --- a/documents/order.md +++ b/documents/order.md @@ -61,6 +61,9 @@ client.order.all(option) | skip | integer | number of orders to be skipped (default: 0) | | authorized | boolean | Orders for which orders are currently in authorized state. | | receipt | string | Orders with the provided value for receipt. | +| expand[] | string | Used to retrieve additional information about the payment. Possible value is `payments`,`payments.card`,`transfers` or `virtual_account` | +| authorized | boolean | Possible value is `0` or `1` | + **Response:** @@ -103,17 +106,21 @@ client.order.fetch(orderId) ```json { - "id":"order_DaaS6LOUAASb7Y", - "entity":"order", - "amount":2200, - "amount_paid":0, - "amount_due":2200, - "currency":"INR", - "receipt":"Receipt #211", - "status":"attempted", - "attempts":1, - "notes":[], - "created_at":1572505143 + "id": "order_Jc81IZnaXSMLFh", + "entity": "order", + "amount": 50000, + "amount_paid": 50000, + "amount_due": 0, + "currency": "INR", + "receipt": null, + "offer_id": null, + "status": "paid", + "attempts": 1, + "notes": { + "notes_key_1": "value1", + "notes_key_2": "value2" + }, + "created_at": 1654064215 } ``` ------------------------------------------------------------------------------------------------------- @@ -121,7 +128,7 @@ client.order.fetch(orderId) ### Fetch payments for an order ```py -client.order.payment(orderId) +client.order.payments(orderId) ``` **Parameters** @@ -132,35 +139,46 @@ client.order.payment(orderId) **Response:** ```json { - "entity":"collection", - "count":1, - "items":[ + "entity": "collection", + "count": 1, + "items": [ { - "id":"pay_DaaSOvhgcOfzgR", - "entity":"payment", - "amount":2200, - "currency":"INR", - "status":"captured", - "order_id":"order_DaaS6LOUAASb7Y", - "invoice_id":null, - "international":false, - "method":"card", - "amount_refunded":0, - "refund_status":null, - "captured":true, - "description":"Beans in every imaginable flavour", - "card_id":"card_DZon6fd8J3IcA2", - "bank":null, - "wallet":null, - "vpa":null, - "email":"gaurav.kumar@example.com", - "contact":"+919999999988", - "notes":[], - "fee":44, - "tax":0, - "error_code":null, - "error_description":null, - "created_at":1572505160 + "id": "pay_Jc81alhu5LmAUI", + "entity": "payment", + "amount": 50000, + "currency": "INR", + "status": "captured", + "order_id": "order_Jc81IZnaXSMLFh", + "invoice_id": "inv_Jc81IWvxf4TT1F", + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Order # 2", + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "success@razorpay", + "email": "sofiya.shaikh2@razorpay.com", + "contact": "+919702219003", + "customer_id": "cust_JR4BVKjKyJ7enk", + "token_id": "token_Jc81b6OBfodoi6", + "notes": { + "opencart_order_id": "2" + }, + "fee": 1180, + "tax": 180, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "001000100002", + "upi_transaction_id": "npci_txn_id_for_Jc81alhu5LmAUI" + }, + "created_at": 1654064232 } ] } From 89680fca07ec1c06f0bb0f3d76e2137b06049c07 Mon Sep 17 00:00:00 2001 From: ankitdas13 Date: Fri, 1 Jul 2022 01:14:22 +0530 Subject: [PATCH 2/2] added partial payment param --- documents/order.md | 1 + 1 file changed, 1 insertion(+) diff --git a/documents/order.md b/documents/order.md index 9cdb3bab..3deccfd4 100644 --- a/documents/order.md +++ b/documents/order.md @@ -7,6 +7,7 @@ client.order.create({ "amount": 50000, "currency": "INR", "receipt": "receipt#1", + "partial_payment":False, "notes": { "key1": "value3", "key2": "value2"