diff --git a/documents/payment.md b/documents/payment.md index 63661f8..991dbf2 100644 --- a/documents/payment.md +++ b/documents/payment.md @@ -3,58 +3,59 @@ ### Capture payment ```py -client.payment.capture(paymentId,{ - "amount" : 1000, +client.payment.capture(paymentId, amount, { "currency" : "INR" }) ``` **Parameters:** -| Name | Type | Description | -|-----------|---------|--------------------------------------------------------------------------------| -| 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) | +| Name | Type | Description | +| ----------- | ------- | ------------------------------------------------------------------------------ | +| 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) | **Response:** + ```json { - "id": "pay_G8VQzjPLoAvm6D", - "entity": "payment", - "amount": 1000, - "currency": "INR", - "status": "captured", - "order_id": "order_G8VPOayFxWEU28", - "invoice_id": null, - "international": false, - "method": "upi", - "amount_refunded": 0, - "refund_status": null, - "captured": true, - "description": "Purchase Shoes", - "card_id": null, - "bank": null, - "wallet": null, - "vpa": "gaurav.kumar@exampleupi", - "email": "gaurav.kumar@example.com", - "contact": "+919999999999", - "customer_id": "cust_DitrYCFtCIokBO", - "notes": [], - "fee": 24, - "tax": 4, - "error_code": null, - "error_description": null, - "error_source": null, - "error_step": null, - "error_reason": null, - "acquirer_data": { - "rrn": "033814379298" - }, - "created_at": 1606985209 + "id": "pay_G8VQzjPLoAvm6D", + "entity": "payment", + "amount": 1000, + "currency": "INR", + "status": "captured", + "order_id": "order_G8VPOayFxWEU28", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Purchase Shoes", + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@exampleupi", + "email": "gaurav.kumar@example.com", + "contact": "+919999999999", + "customer_id": "cust_DitrYCFtCIokBO", + "notes": [], + "fee": 24, + "tax": 4, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "033814379298" + }, + "created_at": 1606985209 } ``` -------------------------------------------------------------------------------------------------------- + +--- ### Fetch all payments @@ -64,58 +65,60 @@ client.payment.all(option) **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) | -| expand[] | string | Used to retrieve additional information about the payment. Possible value is `card`, `offers`, `transaction`, `transaction.settlement`, `refunds`, `token` or `emi`| +| 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) | +| expand[] | string | Used to retrieve additional information about the payment. Possible value is `card`, `offers`, `transaction`, `transaction.settlement`, `refunds`, `token` or `emi` | **Response:** + ```json { - "entity": "collection", - "count": 2, - "items": [ - { - "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, - "description": "Purchase Shoes", - "card_id": null, - "bank": "KKBK", - "wallet": null, - "vpa": null, - "email": "gaurav.kumar@example.com", - "contact": "+919999999999", - "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" - }, - "created_at": 1606985740 - } - ] + "entity": "collection", + "count": 2, + "items": [ + { + "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, + "description": "Purchase Shoes", + "card_id": null, + "bank": "KKBK", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "+919999999999", + "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" + }, + "created_at": 1606985740 + } + ] } ``` -------------------------------------------------------------------------------------------------------- + +--- ### Fetch a payment @@ -125,102 +128,107 @@ client.payment.fetch(paymentId) **Parameters:** -| 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`, `transaction`, `transaction.settlement`, `refunds`, `token` or `emi`| +| 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`, `transaction`, `transaction.settlement`, `refunds`, `token` or `emi` | **Response:** + ```json { - "id": "pay_G8VQzjPLoAvm6D", - "entity": "payment", - "amount": 1000, - "currency": "INR", - "status": "captured", - "order_id": "order_G8VPOayFxWEU28", - "invoice_id": null, - "international": false, - "method": "upi", - "amount_refunded": 0, - "refund_status": null, - "captured": true, - "description": "Purchase Shoes", - "card_id": null, - "bank": null, - "wallet": null, - "vpa": "gaurav.kumar@exampleupi", - "email": "gaurav.kumar@example.com", - "contact": "+919999999999", - "customer_id": "cust_DitrYCFtCIokBO", - "notes": [], - "fee": 24, - "tax": 4, - "error_code": null, - "error_description": null, - "error_source": null, - "error_step": null, - "error_reason": null, - "acquirer_data": { - "rrn": "033814379298" - }, - "created_at": 1606985209 + "id": "pay_G8VQzjPLoAvm6D", + "entity": "payment", + "amount": 1000, + "currency": "INR", + "status": "captured", + "order_id": "order_G8VPOayFxWEU28", + "invoice_id": null, + "international": false, + "method": "upi", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "Purchase Shoes", + "card_id": null, + "bank": null, + "wallet": null, + "vpa": "gaurav.kumar@exampleupi", + "email": "gaurav.kumar@example.com", + "contact": "+919999999999", + "customer_id": "cust_DitrYCFtCIokBO", + "notes": [], + "fee": 24, + "tax": 4, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "rrn": "033814379298" + }, + "created_at": 1606985209 } ``` -------------------------------------------------------------------------------------------------------- + +--- ### Fetch payments for an order ```py client.order.payments(orderId) ``` + **Parameters** -| Name | Type | Description | -|----------|--------|-------------------------------------| -| orderId* | string | The id of the order to be retrieve payment info | +| Name | Type | Description | +| --------- | ------ | ----------------------------------------------- | +| orderId\* | string | The id of the order to be retrieve payment info | **Response:** + ```json { - "count": 1, - "entity": "collection", - "items": [ - { - "id": "pay_DovGQXOkPBJjjU", - "entity": "payment", - "amount": 600, - "currency": "INR", - "status": "captured", - "order_id": "order_DovFx48wjYEr2I", - "method": "netbanking", - "amount_refunded": 0, - "refund_status": null, - "captured": true, - "description": "A Wild Sheep Chase is a novel by Japanese author Haruki Murakami", - "card_id": null, - "bank": "SBIN", - "wallet": null, - "vpa": null, - "email": "gaurav.kumar@example.com", - "contact": "9364591752", - "fee": 70, - "tax": 10, - "error_code": null, - "error_description": null, - "error_source": null, - "error_step": null, - "error_reason": null, - "notes": [], - "acquirer_data": { - "bank_transaction_id": "0125836177" - }, - "created_at": 1400826750 - } - ] + "count": 1, + "entity": "collection", + "items": [ + { + "id": "pay_DovGQXOkPBJjjU", + "entity": "payment", + "amount": 600, + "currency": "INR", + "status": "captured", + "order_id": "order_DovFx48wjYEr2I", + "method": "netbanking", + "amount_refunded": 0, + "refund_status": null, + "captured": true, + "description": "A Wild Sheep Chase is a novel by Japanese author Haruki Murakami", + "card_id": null, + "bank": "SBIN", + "wallet": null, + "vpa": null, + "email": "gaurav.kumar@example.com", + "contact": "9364591752", + "fee": 70, + "tax": 10, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "notes": [], + "acquirer_data": { + "bank_transaction_id": "0125836177" + }, + "created_at": 1400826750 + } + ] } ``` -------------------------------------------------------------------------------------------------------- + +--- ### Update a payment @@ -235,51 +243,53 @@ client.payment.edit(paymentId,{ **Parameters:** -| Name | Type | Description | -|-------------|---------|--------------------------------------| -| paymentId* | string | Id of the payment to update | -| notes* | object | A key-value pair | +| Name | Type | Description | +| ----------- | ------ | --------------------------- | +| paymentId\* | string | Id of the payment to update | +| notes\* | object | A key-value pair | **Response:** + ```json { - "id": "pay_CBYy6tLmJTzn3Q", - "entity": "payment", - "amount": 1000, - "currency": "INR", - "status": "authorized", - "order_id": null, - "invoice_id": null, - "international": false, - "method": "netbanking", - "amount_refunded": 0, - "refund_status": null, - "captured": false, - "description": null, - "card_id": null, - "bank": "UTIB", - "wallet": null, - "vpa": null, - "email": "testme@acme.com", - "customer_id": "cust_JR4BVKjKyJ7enk", - "notes": { - "key1": "value1", - "key2": "value2" - }, - "fee": null, - "tax": null, - "error_code": null, - "error_description": null, - "error_source": null, - "error_step": null, - "error_reason": null, - "acquirer_data": { - "bank_transaction_id": "0125836177" - }, - "created_at": 1553504328 + "id": "pay_CBYy6tLmJTzn3Q", + "entity": "payment", + "amount": 1000, + "currency": "INR", + "status": "authorized", + "order_id": null, + "invoice_id": null, + "international": false, + "method": "netbanking", + "amount_refunded": 0, + "refund_status": null, + "captured": false, + "description": null, + "card_id": null, + "bank": "UTIB", + "wallet": null, + "vpa": null, + "email": "testme@acme.com", + "customer_id": "cust_JR4BVKjKyJ7enk", + "notes": { + "key1": "value1", + "key2": "value2" + }, + "fee": null, + "tax": null, + "error_code": null, + "error_description": null, + "error_source": null, + "error_step": null, + "error_reason": null, + "acquirer_data": { + "bank_transaction_id": "0125836177" + }, + "created_at": 1553504328 } ``` -------------------------------------------------------------------------------------------------------- + +--- ### Fetch expanded card or emi details for payments @@ -298,7 +308,7 @@ client.payment.all({'expand[]':'emi'}) **Response:**
For expanded card or emi details for payments response please click [here](https://razorpay.com/docs/api/payments/#fetch-expanded-card-or-emi-details-for-payments) -------------------------------------------------------------------------------------------------------- +--- ### Fetch card details with paymentId @@ -308,37 +318,40 @@ client.payment.fetchCardDetails(paymentId) **Parameters:** -| Name | Type | Description | -|-------------|---------|--------------------------------------| -| paymentId* | string | Id of the payment to update | +| Name | Type | Description | +| ----------- | ------ | --------------------------- | +| paymentId\* | string | Id of the payment to update | **Response:** + ```json { - "id": "card_JXPULjlKqC5j0i", - "entity": "card", - "name": "gaurav", - "last4": "4366", - "network": "Visa", - "type": "credit", - "issuer": "UTIB", - "international": false, - "emi": true, - "sub_type": "consumer", - "token_iin": null + "id": "card_JXPULjlKqC5j0i", + "entity": "card", + "name": "gaurav", + "last4": "4366", + "network": "Visa", + "type": "credit", + "issuer": "UTIB", + "international": false, + "emi": true, + "sub_type": "consumer", + "token_iin": null } ``` -------------------------------------------------------------------------------------------------------- + +--- ### Fetch Payment Downtime Details ```py client.payment.fetchDownTime() ``` + **Response:**
For payment downtime response please click [here](https://razorpay.com/docs/api/payments/downtime/#fetch-payment-downtime-details) -------------------------------------------------------------------------------------------------------- +--- ### Fetch Payment Downtime @@ -348,13 +361,14 @@ client.payment.fetchPaymentDowntimeById(downtimeId) **Parameters:** -| Name | Type | Description | -|-------------|---------|--------------------------------------| -| downtimeId* | string | Id to fetch payment downtime | +| Name | Type | Description | +| ------------ | ------ | ---------------------------- | +| downtimeId\* | string | Id to fetch payment downtime | **Response:** For payment downtime by id response please click [here](https://razorpay.com/docs/api/payments/downtime/#fetch-payment-downtime-details-by-id) -------------------------------------------------------------------------------------------------------- + +--- ### Payment capture settings API @@ -369,42 +383,42 @@ client.order.create({ 'automatic_expiry_period': 12, 'manual_expiry_period': 7200, 'refund_speed': 'optimum' - } + } } }) ``` **Parameters:** -| Name | Type | Description | -|-------------|---------|--------------------------------------| -| amount* | integer | Amount of the order to be paid | -| currency* | string | Currency of the order. Currently only `INR` is supported. | -| receipt | string | Your system order reference id. | -| payment | object | please refer this [doc](https://razorpay.com/docs/payments/payments/capture-settings/api/) for params | -| notes | object | A key-value pair | +| Name | Type | Description | +| ---------- | ------- | ----------------------------------------------------------------------------------------------------- | +| amount\* | integer | Amount of the order to be paid | +| currency\* | string | Currency of the order. Currently only `INR` is supported. | +| receipt | string | Your system order reference id. | +| payment | object | please refer this [doc](https://razorpay.com/docs/payments/payments/capture-settings/api/) for params | +| notes | object | A key-value pair | **Response:**
+ ```json { - "id": "order_Jng8xOZRVEf97O", - "entity": "order", - "amount": 50000, - "amount_paid": 0, - "amount_due": 50000, - "currency": "INR", - "receipt": "rcptid_11", - "offer_id": "offer_JTUADI4ZWBGWur", - "offers": [ - "offer_JTUADI4ZWBGWur" - ], - "status": "created", - "attempts": 0, - "notes": [], - "created_at": 1656586126 + "id": "order_Jng8xOZRVEf97O", + "entity": "order", + "amount": 50000, + "amount_paid": 0, + "amount_due": 50000, + "currency": "INR", + "receipt": "rcptid_11", + "offer_id": "offer_JTUADI4ZWBGWur", + "offers": ["offer_JTUADI4ZWBGWur"], + "status": "created", + "attempts": 0, + "notes": [], + "created_at": 1656586126 } ``` -------------------------------------------------------------------------------------------------------- + +--- ### Create Payment Json @@ -427,25 +441,27 @@ client.payment.createPaymentJson({ ``` **Parameters:** - please refer this [doc](https://razorpay.com/docs/payment-gateway/s2s-integration/payment-methods/) for params +please refer this [doc](https://razorpay.com/docs/payment-gateway/s2s-integration/payment-methods/) for params **Response:**
+ ```json { - "razorpay_payment_id": "pay_FVmAstJWfsD3SO", - "next": [ - { - "action": "redirect", - "url": "https://api.razorpay.com/v1/payments/FVmAtLUe9XZSGM/authorize" - }, - { - "action": "otp_generate", - "url": "https://api.razorpay.com/v1/payments/pay_FVmAstJWfsD3SO/otp_generate?track_id=FVmAtLUe9XZSGM&key_id=" - } - ] + "razorpay_payment_id": "pay_FVmAstJWfsD3SO", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/FVmAtLUe9XZSGM/authorize" + }, + { + "action": "otp_generate", + "url": "https://api.razorpay.com/v1/payments/pay_FVmAstJWfsD3SO/otp_generate?track_id=FVmAtLUe9XZSGM&key_id=" + } + ] } ``` -------------------------------------------------------------------------------------------------------- + +--- ### Create Payment Json (Third party validation) @@ -462,31 +478,34 @@ client.payment.createPaymentJson({ ``` **Parameters:** -| Name | Type | Description | +| Name | Type | Description | |-------------|---------|--------------------------------------| -| amount* | integer | Amount of the order to be paid | -| currency* | string | The currency of the payment (defaults to INR) | -| order_id* | string | The unique identifier of the order created. | -| email* | string | Email of the customer | -| contact* | string | Contact number of the customer | -| method* | string | Possible value is `netbanking` | -| bank* | string | The customer's bank code.For example, `HDFC`.| +| amount* | integer | Amount of the order to be paid | +| currency* | string | The currency of the payment (defaults to INR) | +| order_id* | string | The unique identifier of the order created. | +| email* | string | Email of the customer | +| contact* | string | Contact number of the customer | +| method* | string | Possible value is `netbanking` | +| bank\* | string | The customer's bank code.For example, `HDFC`.| - please refer this [doc](https://razorpay.com/docs/payments/third-party-validation/s2s-integration/netbanking#step-3-create-a-payment) for params +please refer this [doc](https://razorpay.com/docs/payments/third-party-validation/s2s-integration/netbanking#step-3-create-a-payment) for params **Response:**
+ ```json { - "razorpay_payment_id": "pay_GAWOYqPlvrtPSi", - "next": [ - { - "action": "redirect", - "url": "https://api.razorpay.com/v1/payments/pay_GAWOYqPlvrtPSi/authorize" - } - ] + "razorpay_payment_id": "pay_GAWOYqPlvrtPSi", + "next": [ + { + "action": "redirect", + "url": "https://api.razorpay.com/v1/payments/pay_GAWOYqPlvrtPSi/authorize" + } + ] } ``` -------------------------------------------------------------------------------------------------------- + +--- + ### Create Payment UPI s2s / VPA token (Third party validation) ```py @@ -515,30 +534,33 @@ client.payment.createUpi({ ``` **Parameters:** -| Name | Type | Description | +| Name | Type | Description | |-------------|---------|--------------------------------------| -| amount* | integer | Amount of the order to be paid | -| currency* | string | The currency of the payment (defaults to INR) | -| order_id* | string | The unique identifier of the order created. | -| email* | string | Email of the customer | -| customer_id* | string | The id of the customer to be fetched | -| contact* | string | Contact number of the customer | -| notes | array | A key-value pair | -| description | string | Descriptive text of the payment. | -| save | boolean | Specifies if the VPA should be stored as tokens.Possible value is `0`, `1` | -| callback_url | string | URL where Razorpay will submit the final payment status. | -| ip* | string | The client's browser IP address. For example `117.217.74.98` | -| referer* | string | Value of `referer` header passed by the client's browser. For example, `https://example.com/` | -| user_agent* | string | Value of `user_agent` header passed by the client's browser. For example, `Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36` | -| upi* (for Upi only) | array | All keys listed [here](https://razorpay.com/docs/payments/third-party-validation/s2s-integration/upi/collect#step-14-initiate-a-payment) are supported | +| amount* | integer | Amount of the order to be paid | +| currency* | string | The currency of the payment (defaults to INR) | +| order_id* | string | The unique identifier of the order created. | +| email* | string | Email of the customer | +| customer_id* | string | The id of the customer to be fetched | +| contact* | string | Contact number of the customer | +| notes | array | A key-value pair | +| description | string | Descriptive text of the payment. | +| save | boolean | Specifies if the VPA should be stored as tokens.Possible value is `0`, `1` | +| callback_url | string | URL where Razorpay will submit the final payment status. | +| ip* | string | The client's browser IP address. For example `117.217.74.98` | +| referer* | string | Value of `referer` header passed by the client's browser. For example, `https://example.com/` | +| user_agent* | string | Value of `user_agent` header passed by the client's browser. For example, `Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36` | +| upi* (for Upi only) | array | All keys listed [here](https://razorpay.com/docs/payments/third-party-validation/s2s-integration/upi/collect#step-14-initiate-a-payment) are supported | **Response:**
+ ```json { - "razorpay_payment_id": "pay_EAm09NKReXi2e0" + "razorpay_payment_id": "pay_EAm09NKReXi2e0" } ``` -------------------------------------------------------------------------------------------------------- + +--- + ### Create Payment UPI s2s / VPA token (Third party validation) ```py @@ -563,41 +585,42 @@ client.payment.createUpi({ ``` **Parameters:** -| Name | Type | Description | +| Name | Type | Description | |-------------|---------|--------------------------------------| -| amount* | integer | Amount of the order to be paid | -| currency* | string | The currency of the payment (defaults to INR) | -| order_id* | string | The unique identifier of the order created. | -| email* | string | Email of the customer | -| customer_id* | string | The id of the customer to be fetched | -| contact* | string | Contact number of the customer | -| notes | array | A key-value pair | -| description | string | Descriptive text of the payment. | -| save | boolean | Specifies if the VPA should be stored as tokens.Possible value is `0`, `1` | -| callback_url | string | URL where Razorpay will submit the final payment status. | -| ip* | string | The client's browser IP address. For example `117.217.74.98` | -| referer* | string | Value of `referer` header passed by the client's browser. For example, `https://example.com/` | -| user_agent* | string | Value of `user_agent` header passed by the client's browser. For example, `Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36` | -| upi* (for Upi only) | array | All keys listed [here](https://razorpay.com/docs/payments/third-party-validation/s2s-integration/upi/intent/#step-2-initiate-a-payment) are supported | +| amount* | integer | Amount of the order to be paid | +| currency* | string | The currency of the payment (defaults to INR) | +| order_id* | string | The unique identifier of the order created. | +| email* | string | Email of the customer | +| customer_id* | string | The id of the customer to be fetched | +| contact* | string | Contact number of the customer | +| notes | array | A key-value pair | +| description | string | Descriptive text of the payment. | +| save | boolean | Specifies if the VPA should be stored as tokens.Possible value is `0`, `1` | +| callback_url | string | URL where Razorpay will submit the final payment status. | +| ip* | string | The client's browser IP address. For example `117.217.74.98` | +| referer* | string | Value of `referer` header passed by the client's browser. For example, `https://example.com/` | +| user_agent* | string | Value of `user_agent` header passed by the client's browser. For example, `Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36` | +| upi* (for Upi only) | array | All keys listed [here](https://razorpay.com/docs/payments/third-party-validation/s2s-integration/upi/intent/#step-2-initiate-a-payment) are supported | **Response:**
-```json + +````json { "razorpay_payment_id": "pay_CMeM6XvOPGFiF", "link": "upi://pay?pa=success@razorpay&pn=xyz&tr=xxxxxxxxxxx&tn=gourav&am=1&cu=INR&mc=xyzw" -} +} ------------------------------------------------------------------------------------------------------- ### OTP Generate ```py client.payment.otpGenerate(paymentId) -``` +```` **Parameters:** -| Name | Type | Description | -|-------------|---------|--------------------------------------| -| paymentId* | integer | Unique identifier of the payment | +| Name | Type | Description | +| ----------- | ------- | -------------------------------- | +| paymentId\* | integer | Unique identifier of the payment | Doc reference [doc](https://razorpay.com/docs/payments/payment-gateway/s2s-integration/json/v2/build-integration/cards/#otp-generation-) @@ -605,26 +628,27 @@ Doc reference [doc](https://razorpay.com/docs/payments/payment-gateway/s2s-integ ```json { - "razorpay_payment_id": "pay_FVmAstJWfsD3SO", - "next": [ - { - "action": "otp_submit", - "url": "https://api.razorpay.com/v1/payments/pay_FVmAstJWfsD3SO/otp_submit/ac2d415a8be7595de09a24b41661729fd9028fdc?key_id=" - }, - { - "action": "otp_resend", - "url": "https://api.razorpay.com/v1/payments/pay_FVmAstJWfsD3SO/otp_resend/json?key_id=" - } - ], - "metadata": { - "issuer": "HDFC", - "network": "MC", - "last4": "1111", - "iin": "411111" - } + "razorpay_payment_id": "pay_FVmAstJWfsD3SO", + "next": [ + { + "action": "otp_submit", + "url": "https://api.razorpay.com/v1/payments/pay_FVmAstJWfsD3SO/otp_submit/ac2d415a8be7595de09a24b41661729fd9028fdc?key_id=" + }, + { + "action": "otp_resend", + "url": "https://api.razorpay.com/v1/payments/pay_FVmAstJWfsD3SO/otp_resend/json?key_id=" + } + ], + "metadata": { + "issuer": "HDFC", + "network": "MC", + "last4": "1111", + "iin": "411111" + } } ``` -------------------------------------------------------------------------------------------------------- + +--- ### OTP Submit @@ -636,23 +660,25 @@ client.payment.otpSubmit(paymentId,{ **Parameters:** -| Name | Type | Description | -|-------------|---------|--------------------------------------| -| paymentId* | integer | Unique identifier of the payment | -| otp* | string | The customer receives the OTP using their preferred notification medium - SMS or email | +| Name | Type | Description | +| ----------- | ------- | -------------------------------------------------------------------------------------- | +| paymentId\* | integer | Unique identifier of the payment | +| otp\* | string | The customer receives the OTP using their preferred notification medium - SMS or email | Doc reference [doc](https://razorpay.com/docs/payments/payment-gateway/s2s-integration/json/v2/build-integration/cards/#response-on-submitting-otp) **Response:**
Success + ```json { - "razorpay_payment_id": "pay_D5jmY2H6vC7Cy3", - "razorpay_order_id": "order_9A33XWu170gUtm", - "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" + "razorpay_payment_id": "pay_D5jmY2H6vC7Cy3", + "razorpay_order_id": "order_9A33XWu170gUtm", + "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d" } ``` -------------------------------------------------------------------------------------------------------- + +--- ### Valid VPA (Third party validation) @@ -663,21 +689,23 @@ client.payment.validateVpa({ ``` **Parameters:** -| Name | Type | Description | +| Name | Type | Description | |-------------|---------|--------------------------------------| -| vpa* | string | The virtual payment address (VPA) you want to validate. For example, `gauravkumar@exampleupi` | +| vpa\* | string | The virtual payment address (VPA) you want to validate. For example, `gauravkumar@exampleupi` | - please refer this [doc](https://razorpay.com/docs/payments/third-party-validation/s2s-integration/upi/collect#step-13-validate-the-vpa) for params +please refer this [doc](https://razorpay.com/docs/payments/third-party-validation/s2s-integration/upi/collect#step-13-validate-the-vpa) for params **Response:**
+ ```json { - "vpa": "gauravkumar@exampleupi", - "success": true, - "customer_name": "Gaurav Kumar" + "vpa": "gauravkumar@exampleupi", + "success": true, + "customer_name": "Gaurav Kumar" } ``` -------------------------------------------------------------------------------------------------------- + +--- ### Fetch payment methods (Third party validation) @@ -687,21 +715,21 @@ client.payment.fetchPaymentMethods() ``` **Response:**
- please refer this [doc](https://razorpay.com/docs/payments/third-party-validation/s2s-integration/methods-api/#fetch-payment-methods) for response +please refer this [doc](https://razorpay.com/docs/payments/third-party-validation/s2s-integration/methods-api/#fetch-payment-methods) for response -``` +```` ======= ### OTP Resend ```py client.payment.otpResend(paymentId) -``` +```` **Parameters:** -| Name | Type | Description | -|-------------|---------|--------------------------------------| -| paymentId* | integer | Unique identifier of the payment | +| Name | Type | Description | +| ----------- | ------- | -------------------------------- | +| paymentId\* | integer | Unique identifier of the payment | Doc reference [doc](https://razorpay.com/docs/payments/payment-methods/cards/authentication/native-otp/#otp-resend) @@ -709,14 +737,13 @@ Doc reference [doc](https://razorpay.com/docs/payments/payment-methods/cards/aut ```json { - "next": [ - "otp_submit", - "otp_resend" - ], - "razorpay_payment_id": "pay_JWaNvYmrx75sXo" + "next": ["otp_submit", "otp_resend"], + "razorpay_payment_id": "pay_JWaNvYmrx75sXo" } ``` -------------------------------------------------------------------------------------------------------- + +--- + ### Token IIN API ```py @@ -727,41 +754,44 @@ client.iin.fetch(tokenIin) **Parameters:** -| Name | Type | Description | -|------------|--------|-----------------------------------| -| tokenIin* | string | The token IIN. | +| Name | Type | Description | +| ---------- | ------ | -------------- | +| tokenIin\* | string | The token IIN. | **Response:** + ```json { - "iin": "412345", - "entity": "iin", - "network": "Visa", - "type": "credit", - "sub_type": "business", - "issuer_code": "HDFC", - "issuer_name": "HDFC Bank Ltd", - "international": false, - "is_tokenized": true, - "card_iin": "411111", - "emi":{ - "available": true - }, - "recurring": { - "available": true - }, - "authentication_types": [ - { - "type":"3ds" - }, - { - "type":"otp" - } - ] + "iin": "412345", + "entity": "iin", + "network": "Visa", + "type": "credit", + "sub_type": "business", + "issuer_code": "HDFC", + "issuer_name": "HDFC Bank Ltd", + "international": false, + "is_tokenized": true, + "card_iin": "411111", + "emi": { + "available": true + }, + "recurring": { + "available": true + }, + "authentication_types": [ + { + "type": "3ds" + }, + { + "type": "otp" + } + ] } ``` -------------------------------------------------------------------------------------------------------- -**PN: * indicates mandatory fields** + +--- + +**PN: \* indicates mandatory fields**

-**For reference click [here](https://razorpay.com/docs/api/payments/)** \ No newline at end of file +**For reference click [here](https://razorpay.com/docs/api/payments/)**