razorpay 3.0.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/pull_request_template.md +8 -0
- data/.github/workflows/ci.yml +79 -0
- data/CHANGELOG.md +8 -0
- data/README.md +1 -1
- data/documents/Invoice.md +11 -3
- data/documents/addon.md +23 -1
- data/documents/card.md +30 -31
- data/documents/customer.md +2 -0
- data/documents/emandate.md +20 -12
- data/documents/fund.md +19 -17
- data/documents/items.md +65 -41
- data/documents/order.md +51 -0
- data/documents/papernach.md +40 -20
- data/documents/payment.md +204 -14
- data/documents/paymentLink.md +37 -19
- data/documents/plan.md +3 -3
- data/documents/qrcode.md +17 -19
- data/documents/refund.md +11 -10
- data/documents/registerEmandate.md +25 -18
- data/documents/registerNach.md +49 -57
- data/documents/settlement.md +1 -0
- data/documents/subscriptions.md +3 -1
- data/documents/tokens.md +55 -1
- data/documents/transfers.md +292 -195
- data/documents/upi.md +25 -28
- data/documents/virtualAccount.md +18 -13
- data/lib/razorpay/addon.rb +4 -0
- data/lib/razorpay/constants.rb +1 -1
- data/lib/razorpay/payment.rb +8 -0
- data/lib/razorpay/payment_method.rb +17 -0
- data/lib/razorpay.rb +1 -0
- data/razorpay-ruby.gemspec +2 -1
- data/test/fixtures/fake_create_upi_payment.json +3 -0
- data/test/fixtures/fake_validate_vpa.json +5 -0
- data/test/fixtures/payment_methods_collection.json +149 -0
- data/test/razorpay/test_addon.rb +6 -2
- data/test/razorpay/test_payment.rb +46 -2
- data/test/test_helper.rb +2 -0
- metadata +30 -7
data/documents/order.md
CHANGED
@@ -52,6 +52,56 @@ Razorpay::Order.create(para_attr)
|
|
52
52
|
|
53
53
|
-------------------------------------------------------------------------------------------------------
|
54
54
|
|
55
|
+
### Create order (Third party validation)
|
56
|
+
|
57
|
+
```rb
|
58
|
+
para_attr = {
|
59
|
+
"amount": 500,
|
60
|
+
"method": "netbanking",
|
61
|
+
"receipt": "BILL13375649",
|
62
|
+
"currency": "INR",
|
63
|
+
"bank_account": {
|
64
|
+
"account_number": "765432123456789",
|
65
|
+
"name": "Gaurav Kumar",
|
66
|
+
"ifsc": "HDFC0000053"
|
67
|
+
}
|
68
|
+
}
|
69
|
+
|
70
|
+
Razorpay::Order.create(para_attr)
|
71
|
+
```
|
72
|
+
|
73
|
+
**Parameters:**
|
74
|
+
|
75
|
+
| Name | Type | Description |
|
76
|
+
|-----------------|---------|------------------------------------------------------------------------------|
|
77
|
+
| amount* | integer | Amount of the order to be paid |
|
78
|
+
| method | string | The payment method used to make the payment. If this parameter is not passed, customers will be able to make payments using both netbanking and UPI payment methods. Possible values is `netbanking` or `upi`|
|
79
|
+
| currency* | string | Currency of the order. Currently only `INR` is supported. |
|
80
|
+
| receipt | string | Your system order reference id. |
|
81
|
+
|bank_account | array | All keys listed [here](https://razorpay.com/docs/payments/third-party-validation/#step-2-create-an-order) are supported |
|
82
|
+
| notes | object | A key-value pair |
|
83
|
+
|
84
|
+
**Response:**
|
85
|
+
|
86
|
+
```json
|
87
|
+
{
|
88
|
+
"id": "order_GAWN9beXgaqRyO",
|
89
|
+
"entity": "order",
|
90
|
+
"amount": 500,
|
91
|
+
"amount_paid": 0,
|
92
|
+
"amount_due": 500,
|
93
|
+
"currency": "INR",
|
94
|
+
"receipt": "BILL13375649",
|
95
|
+
"offer_id": null,
|
96
|
+
"status": "created",
|
97
|
+
"attempts": 0,
|
98
|
+
"notes": [],
|
99
|
+
"created_at": 1573044247
|
100
|
+
}
|
101
|
+
```
|
102
|
+
|
103
|
+
-------------------------------------------------------------------------------------------------------
|
104
|
+
|
55
105
|
### Fetch all orders
|
56
106
|
|
57
107
|
```rb
|
@@ -70,6 +120,7 @@ Razorpay::Order.all(option)
|
|
70
120
|
| skip | integer | number of orders to be skipped (default: 0) |
|
71
121
|
| authorized | boolean | Orders for which orders are currently in authorized state. |
|
72
122
|
| receipt | string | Orders with the provided value for receipt. |
|
123
|
+
| expand[] | string | Used to retrieve additional information about the payment. Possible value is `payments`,`payments.card`,`transfers` or `virtual_account` |
|
73
124
|
|
74
125
|
**Response:**
|
75
126
|
|
data/documents/papernach.md
CHANGED
@@ -12,7 +12,6 @@ para_attr = {
|
|
12
12
|
"contact": 9123456780,
|
13
13
|
"email": "gaurav.kumar@example.com",
|
14
14
|
"fail_existing": 0,
|
15
|
-
"gstin": "29XAbbA4369J1PA",
|
16
15
|
"notes": {
|
17
16
|
"notes_key_1": "Tea, Earl Grey, Hot",
|
18
17
|
"notes_key_2": "Tea, Earl Grey… decaf."
|
@@ -30,6 +29,7 @@ Razorpay::Customer.create(para_attr)
|
|
30
29
|
| email | string | Email of the customer |
|
31
30
|
| contact | string | Contact number of the customer |
|
32
31
|
| notes | object | A key-value pair |
|
32
|
+
| fail_existing | string | If a customer with the same details already exists, the request throws an exception by default. Possible value is `0` or `1`|
|
33
33
|
|
34
34
|
**Response:**
|
35
35
|
```json
|
@@ -53,28 +53,33 @@ Razorpay::Customer.create(para_attr)
|
|
53
53
|
|
54
54
|
```rb
|
55
55
|
para_attr = {
|
56
|
-
"amount":
|
56
|
+
"amount":0,
|
57
57
|
"currency": "INR",
|
58
|
-
"method": "
|
58
|
+
"method": "nach",
|
59
59
|
"customer_id": "cust_1Aa00000000001",
|
60
60
|
"receipt": "Receipt No. 1",
|
61
61
|
"notes": {
|
62
62
|
"notes_key_1": "Beam me up Scotty",
|
63
63
|
"notes_key_2": "Engage"
|
64
64
|
},
|
65
|
-
"token":
|
66
|
-
"auth_type": "
|
67
|
-
"max_amount":
|
68
|
-
"expire_at":
|
65
|
+
"token":{
|
66
|
+
"auth_type": "physical",
|
67
|
+
"max_amount": 10000000,
|
68
|
+
"expire_at": 2709971120,
|
69
69
|
"notes": {
|
70
70
|
"notes_key_1": "Tea, Earl Grey, Hot",
|
71
71
|
"notes_key_2": "Tea, Earl Grey… decaf."
|
72
72
|
},
|
73
|
-
"bank_account":
|
73
|
+
"bank_account":{
|
74
|
+
"account_number": "11214311215411",
|
75
|
+
"ifsc_code": "HDFC0000001",
|
74
76
|
"beneficiary_name": "Gaurav Kumar",
|
75
|
-
"
|
76
|
-
|
77
|
-
|
77
|
+
"account_type": "savings"
|
78
|
+
},
|
79
|
+
"nach":{
|
80
|
+
"form_reference1": "Recurring Payment for Gaurav Kumar",
|
81
|
+
"form_reference2": "Method Paper NACH",
|
82
|
+
"description": "Paper NACH Gaurav Kumar"
|
78
83
|
}
|
79
84
|
}
|
80
85
|
}
|
@@ -212,17 +217,29 @@ para_attr = {
|
|
212
217
|
|
213
218
|
Razorpay::SubscriptionRegistration.create(para_attr)
|
214
219
|
```
|
215
|
-
|
216
220
|
**Parameters:**
|
217
|
-
|
221
|
+
|
222
|
+
| Name | Type | Description |
|
223
|
+
|-----------------|---------|------------------------------------------------------------------------------|
|
224
|
+
| customer | object | All parameters listed [here](https://razorpay.com/docs/api/payments/recurring-payments/paper-nach/create-authorization-transaction/#121-create-a-registration-link) |
|
225
|
+
| type* | string | In this case, the value is `link`. |
|
226
|
+
| currency* | string | The 3-letter ISO currency code for the payment. Currently, only `INR` is supported. |
|
227
|
+
| amount* | integer | The payment amount in the smallest currency sub-unit. |
|
228
|
+
| description* | string | A description that appears on the hosted page. For example, `12:30 p.m. Thali meals (Gaurav Kumar`). |
|
229
|
+
| subscription_registration | object | All parameters listed [here](https://razorpay.com/docs/api/payments/recurring-payments/paper-nach/create-authorization-transaction/#121-create-a-registration-link) |
|
230
|
+
| sms_notify | boolean | SMS notifications are to be sent by Razorpay (default : 1) |
|
231
|
+
| email_notify | boolean | Email notifications are to be sent by Razorpay (default : 1) |
|
232
|
+
| expire_by | integer | The timestamp, in Unix format, till when the customer can make the authorization payment. |
|
233
|
+
| receipt | string | Your system order reference id. |
|
234
|
+
| notes | object | A key-value pair |
|
218
235
|
|
219
236
|
**Response:**
|
220
237
|
```json
|
221
238
|
{
|
222
239
|
"id": "inv_FHrZiAubEzDdaq",
|
223
240
|
"entity": "invoice",
|
224
|
-
"receipt": "Receipt No.
|
225
|
-
"invoice_number": "Receipt No.
|
241
|
+
"receipt": "Receipt No. 27",
|
242
|
+
"invoice_number": "Receipt No. 27",
|
226
243
|
"customer_id": "cust_BMB3EwbqnqZ2EI",
|
227
244
|
"customer_details": {
|
228
245
|
"id": "cust_BMB3EwbqnqZ2EI",
|
@@ -315,7 +332,7 @@ invoiceId = "inv_JDdNb4xdf4gxQ7"
|
|
315
332
|
|
316
333
|
medium = "email"
|
317
334
|
|
318
|
-
Razorpay::Invoice.
|
335
|
+
Razorpay::Invoice.notify_by(invoiceId, medium)
|
319
336
|
```
|
320
337
|
|
321
338
|
**Parameters:**
|
@@ -556,7 +573,7 @@ Razorpay::Payment.fetch(paymentId)
|
|
556
573
|
```rb
|
557
574
|
customerId = "cust_1Aa00000000004"
|
558
575
|
|
559
|
-
Razorpay::Customer.
|
576
|
+
Razorpay::Customer.fetch(customerId).fetchTokens
|
560
577
|
```
|
561
578
|
|
562
579
|
**Parameters:**
|
@@ -602,7 +619,7 @@ customerId = "cust_1Aa00000000004"
|
|
602
619
|
|
603
620
|
tokenId = "token_Hxe0skTXLeg9pF"
|
604
621
|
|
605
|
-
Razorpay::fetch(customerId).deleteToken(tokenId)
|
622
|
+
Razorpay::Customer.fetch(customerId).deleteToken(tokenId)
|
606
623
|
```
|
607
624
|
|
608
625
|
**Parameters:**
|
@@ -626,6 +643,7 @@ Razorpay::fetch(customerId).deleteToken(tokenId)
|
|
626
643
|
para_attr{
|
627
644
|
"amount": 1000,
|
628
645
|
"currency": "INR",
|
646
|
+
"payment_capture": true,
|
629
647
|
"receipt": "Receipt No. 1",
|
630
648
|
"notes": {
|
631
649
|
"notes_key_1": "Tea, Earl Grey, Hot",
|
@@ -637,10 +655,12 @@ Razorpay::Order.create(para_attr)
|
|
637
655
|
|
638
656
|
**Parameters:**
|
639
657
|
|
658
|
+
|
640
659
|
| Name | Type | Description |
|
641
660
|
|-----------------|---------|------------------------------------------------------------------------------|
|
642
|
-
| amount* | integer | Amount
|
661
|
+
| amount* | integer | Amount in currency subunits. For cards, the minimum value is `100` (₹1). |
|
643
662
|
| currency* | string | Currency of the order. Currently only `INR` is supported. |
|
663
|
+
| payment_capture* | boolean | Indicates whether payment status should be changed to captured automatically or not. Possible values: true - Payments are captured automatically. false - Payments are not captured automatically. |
|
644
664
|
| receipt | string | Your system order reference id. |
|
645
665
|
| notes | object | A key-value pair |
|
646
666
|
**Response:**
|
@@ -683,7 +703,7 @@ para_attr = {
|
|
683
703
|
"note_key 2": "Tea. Earl Gray. Hot."
|
684
704
|
}
|
685
705
|
}
|
686
|
-
Razorpay::Payment.
|
706
|
+
Razorpay::Payment.create_recurring_payment(para_attr)
|
687
707
|
```
|
688
708
|
|
689
709
|
**Parameters:**
|
data/documents/payment.md
CHANGED
@@ -13,7 +13,7 @@ paymentId = "pay_G8VQzjPLoAvm6D"
|
|
13
13
|
|
14
14
|
para_attr = {
|
15
15
|
"amount": 1000,
|
16
|
-
"currency"
|
16
|
+
"currency": "INR"
|
17
17
|
}
|
18
18
|
Razorpay::Payment.capture(paymentId, para_attr)
|
19
19
|
```
|
@@ -23,8 +23,7 @@ Razorpay::Payment.capture(paymentId, para_attr)
|
|
23
23
|
| Name | Type | Description |
|
24
24
|
|-----------|---------|--------------------------------------------------------------------------------|
|
25
25
|
| paymentId* | string | Id of the payment to capture |
|
26
|
-
| para_attr
|
27
|
-
| para_attr["currency"]* | string | The currency of the payment (defaults to INR) |
|
26
|
+
| para_attr | object | All parameters listed [here](https://razorpay.com/docs/api/payments/#capture-a-payment) are supported |
|
28
27
|
|
29
28
|
**Response:**
|
30
29
|
```json
|
@@ -81,7 +80,7 @@ Razorpay::Payment.all(option)
|
|
81
80
|
| to | timestamp | timestamp before which the payments were created |
|
82
81
|
| count | integer | number of payments to fetch (default: 10) |
|
83
82
|
| skip | integer | number of payments to be skipped (default: 0) |
|
84
|
-
| expand[] |
|
83
|
+
| expand[] | string | Supported values are: -card: Expanded card details, usable for card and EMI payments. -emi: Expanded EMI plan details, usable for EMI payments |
|
85
84
|
|
86
85
|
|
87
86
|
**Response:**
|
@@ -255,8 +254,8 @@ Razorpay::Payment.fetch(paymentId).edit(para_attr)
|
|
255
254
|
|
256
255
|
| Name | Type | Description |
|
257
256
|
|-------------|---------|--------------------------------------|
|
258
|
-
| paymentId* | string | Id of the payment to update
|
259
|
-
| notes* | object | A key-value pair
|
257
|
+
| paymentId* | string | Id of the payment to update |
|
258
|
+
| notes* | object | A key-value pair |
|
260
259
|
|
261
260
|
**Response:**
|
262
261
|
```json
|
@@ -383,10 +382,10 @@ para_attr = {
|
|
383
382
|
"currency": "INR",
|
384
383
|
"receipt": "rcptid_11",
|
385
384
|
"payment": {
|
386
|
-
"capture
|
387
|
-
"capture_options
|
388
|
-
"automatic_expiry_period
|
389
|
-
"manual_expiry_period
|
385
|
+
"capture": "automatic",
|
386
|
+
"capture_options": {
|
387
|
+
"automatic_expiry_period": 12,
|
388
|
+
"manual_expiry_period": 7200,
|
390
389
|
"refund_speed": "optimum"
|
391
390
|
}
|
392
391
|
}
|
@@ -401,7 +400,8 @@ Razorpay::Order.create(para_attr)
|
|
401
400
|
| amount* | integer | Amount of the order to be paid |
|
402
401
|
| currency* | string | Currency of the order. Currently only `INR` is supported. |
|
403
402
|
| receipt | string | Your system order reference id. |
|
404
|
-
| payment | object | please refer this [doc](https://razorpay.com/docs/payments/payments/capture-settings/api/) for params
|
403
|
+
| payment | object | please refer this [doc](https://razorpay.com/docs/payments/payments/capture-settings/api/) for params |
|
404
|
+
| notes | object | A key-value pair |
|
405
405
|
|
406
406
|
**Response:** <br>
|
407
407
|
```json
|
@@ -497,12 +497,12 @@ Razorpay::Payment.create_json_payment(para_attr)
|
|
497
497
|
| email* | string | Email of the customer |
|
498
498
|
| contact* | string | Contact number of the customer |
|
499
499
|
| method* | string | Possible value is `card`, `netbanking`, `wallet`,`emi`, `upi`, `cardless_emi`, `paylater`. |
|
500
|
-
| card |
|
500
|
+
| card | object | All keys listed [here](https://razorpay.com/docs/payments/payment-gateway/s2s-integration/payment-methods/#supported-payment-fields) are supported |
|
501
501
|
| bank | string | Bank code of the bank used for the payment. Required if the method is `netbanking`.|
|
502
|
-
| bank_account |
|
502
|
+
| bank_account | object | All keys listed [here](https://razorpay.com/docs/payments/customers/customer-fund-account-api/#create-a-fund-account) are supported |
|
503
503
|
| vpa | string | Virtual payment address of the customer. Required if the method is `upi`. |
|
504
504
|
| wallet | string | Wallet code for the wallet used for the payment. Required if the method is `wallet`. |
|
505
|
-
| notes |
|
505
|
+
| notes | object | A key-value pair |
|
506
506
|
|
507
507
|
please refer this [doc](https://razorpay.com/docs/payment-gateway/s2s-integration/payment-methods/) for params
|
508
508
|
|
@@ -630,6 +630,196 @@ Doc reference [doc](https://razorpay.com/docs/payments/payment-methods/cards/aut
|
|
630
630
|
|
631
631
|
-------------------------------------------------------------------------------------------------------
|
632
632
|
|
633
|
+
### Create Payment Json (Third party validation)
|
634
|
+
|
635
|
+
```rb
|
636
|
+
param_attr = {
|
637
|
+
"amount": "100",
|
638
|
+
"currency": "INR",
|
639
|
+
"email": "gaurav.kumar@example.com",
|
640
|
+
"contact": "9123456789",
|
641
|
+
"order_id": "order_JkVtS9XJdk2u0B",
|
642
|
+
"method": "netbanking",
|
643
|
+
"bank": "HDFC"
|
644
|
+
}
|
645
|
+
|
646
|
+
Razorpay::Payment.create_json_payment(param_attr)
|
647
|
+
|
648
|
+
```
|
649
|
+
|
650
|
+
**Parameters:**
|
651
|
+
| Name | Type | Description |
|
652
|
+
|-------------|---------|--------------------------------------|
|
653
|
+
| amount* | integer | Amount of the order to be paid |
|
654
|
+
| currency* | string | The currency of the payment (defaults to INR) |
|
655
|
+
| order_id* | string | The unique identifier of the order created. |
|
656
|
+
| email* | string | Email of the customer |
|
657
|
+
| contact* | string | Contact number of the customer |
|
658
|
+
| method* | string | Possible value is `netbanking` |
|
659
|
+
| bank* | string | The customer's bank code.For example, `HDFC`.|
|
660
|
+
|
661
|
+
please refer this [doc](https://razorpay.com/docs/payments/third-party-validation/s2s-integration/netbanking#step-3-create-a-payment) for params
|
662
|
+
|
663
|
+
**Response:** <br>
|
664
|
+
```json
|
665
|
+
{
|
666
|
+
"razorpay_payment_id": "pay_GAWOYqPlvrtPSi",
|
667
|
+
"next": [
|
668
|
+
{
|
669
|
+
"action": "redirect",
|
670
|
+
"url": "https://api.razorpay.com/v1/payments/pay_GAWOYqPlvrtPSi/authorize"
|
671
|
+
}
|
672
|
+
]
|
673
|
+
}
|
674
|
+
```
|
675
|
+
-------------------------------------------------------------------------------------------------------
|
676
|
+
### Create Payment UPI s2s / VPA token (Third party validation)
|
677
|
+
|
678
|
+
```rb
|
679
|
+
para_attr = {
|
680
|
+
"amount": 200,
|
681
|
+
"currency": "INR",
|
682
|
+
"order_id": "order_GAWRjlWkVcRh0V",
|
683
|
+
"email": "gaurav.kumar@example.com",
|
684
|
+
"contact": "9123456789",
|
685
|
+
"method": "upi",
|
686
|
+
"customer_id": "cust_EIW4T2etiweBmG",
|
687
|
+
"save": 1,
|
688
|
+
"ip": "192.168.0.103",
|
689
|
+
"referer": "http",
|
690
|
+
"user_agent": "Mozilla/5.0",
|
691
|
+
"description": "Test flow",
|
692
|
+
"notes": {
|
693
|
+
"note_key": "value1"
|
694
|
+
},
|
695
|
+
"upi": {
|
696
|
+
"flow": "collect",
|
697
|
+
"vpa": "gauravkumar@exampleupi",
|
698
|
+
"expiry_time": 5
|
699
|
+
}
|
700
|
+
}
|
701
|
+
|
702
|
+
Razorpay::Payment.create_upi(para_attr)
|
703
|
+
```
|
704
|
+
|
705
|
+
**Parameters:**
|
706
|
+
| Name | Type | Description |
|
707
|
+
|-------------|---------|--------------------------------------|
|
708
|
+
| amount* | integer | Amount of the order to be paid |
|
709
|
+
| currency* | string | The currency of the payment (defaults to INR) |
|
710
|
+
| order_id* | string | The unique identifier of the order created. |
|
711
|
+
| email* | string | Email of the customer |
|
712
|
+
| customer_id* | string | The id of the customer to be fetched |
|
713
|
+
| contact* | string | Contact number of the customer |
|
714
|
+
| notes | array | A key-value pair |
|
715
|
+
| description | string | Descriptive text of the payment. |
|
716
|
+
| save | boolean | Specifies if the VPA should be stored as tokens.Possible value is `0`, `1` |
|
717
|
+
| callback_url | string | URL where Razorpay will submit the final payment status. |
|
718
|
+
| ip* | string | The client's browser IP address. For example `117.217.74.98` |
|
719
|
+
| referer* | string | Value of `referer` header passed by the client's browser. For example, `https://example.com/` |
|
720
|
+
| 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` |
|
721
|
+
| 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 |
|
722
|
+
|
723
|
+
**Response:** <br>
|
724
|
+
```json
|
725
|
+
{
|
726
|
+
"razorpay_payment_id": "pay_EAm09NKReXi2e0"
|
727
|
+
}
|
728
|
+
```
|
729
|
+
-------------------------------------------------------------------------------------------------------
|
730
|
+
### Create Payment UPI s2s / VPA token (Third party validation)
|
731
|
+
|
732
|
+
```rb
|
733
|
+
para_attr = {
|
734
|
+
"amount": 100,
|
735
|
+
"currency": "INR",
|
736
|
+
"order_id": "order_Ee0biRtLOqzRjP",
|
737
|
+
"email": "gaurav.kumar@example.com",
|
738
|
+
"contact": "9090909090",
|
739
|
+
"method": "upi",
|
740
|
+
"ip": "192.168.0.103",
|
741
|
+
"referer": "http",
|
742
|
+
"user_agent": "Mozilla/5.0",
|
743
|
+
"description": "Test flow",
|
744
|
+
"notes": {
|
745
|
+
"purpose": "UPI test payment"
|
746
|
+
},
|
747
|
+
"upi": {
|
748
|
+
"flow": "intent"
|
749
|
+
}
|
750
|
+
}
|
751
|
+
|
752
|
+
Razorpay::Payment.create_upi(para_attr)
|
753
|
+
```
|
754
|
+
|
755
|
+
**Parameters:**
|
756
|
+
| Name | Type | Description |
|
757
|
+
|-------------|---------|--------------------------------------|
|
758
|
+
| amount* | integer | Amount of the order to be paid |
|
759
|
+
| currency* | string | The currency of the payment (defaults to INR) |
|
760
|
+
| order_id* | string | The unique identifier of the order created. |
|
761
|
+
| email* | string | Email of the customer |
|
762
|
+
| customer_id* | string | The id of the customer to be fetched |
|
763
|
+
| contact* | string | Contact number of the customer |
|
764
|
+
| notes | array | A key-value pair |
|
765
|
+
| description | string | Descriptive text of the payment. |
|
766
|
+
| save | boolean | Specifies if the VPA should be stored as tokens.Possible value is `0`, `1` |
|
767
|
+
| callback_url | string | URL where Razorpay will submit the final payment status. |
|
768
|
+
| ip* | string | The client's browser IP address. For example `117.217.74.98` |
|
769
|
+
| referer* | string | Value of `referer` header passed by the client's browser. For example, `https://example.com/` |
|
770
|
+
| 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` |
|
771
|
+
| 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 |
|
772
|
+
|
773
|
+
**Response:** <br>
|
774
|
+
```json
|
775
|
+
{
|
776
|
+
"razorpay_payment_id": "pay_CMeM6XvOPGFiF",
|
777
|
+
"link": "upi://pay?pa=success@razorpay&pn=xyz&tr=xxxxxxxxxxx&tn=gourav&am=1&cu=INR&mc=xyzw"
|
778
|
+
}
|
779
|
+
```
|
780
|
+
-------------------------------------------------------------------------------------------------------
|
781
|
+
|
782
|
+
### Valid VPA (Third party validation)
|
783
|
+
|
784
|
+
```rb
|
785
|
+
para_attr = {
|
786
|
+
"vpa": "gauravkumar@exampleupi"
|
787
|
+
}
|
788
|
+
Razorpay::Payment.validate_vpa(para_attr)
|
789
|
+
```
|
790
|
+
|
791
|
+
**Parameters:**
|
792
|
+
| Name | Type | Description |
|
793
|
+
|-------------|---------|--------------------------------------|
|
794
|
+
| vpa* | string | The virtual payment address (VPA) you want to validate. For example, `gauravkumar@exampleupi` |
|
795
|
+
|
796
|
+
please refer this [doc](https://razorpay.com/docs/payments/third-party-validation/s2s-integration/upi/collect#step-13-validate-the-vpa) for params
|
797
|
+
|
798
|
+
**Response:** <br>
|
799
|
+
```json
|
800
|
+
{
|
801
|
+
"vpa": "gauravkumar@exampleupi",
|
802
|
+
"success": true,
|
803
|
+
"customer_name": "Gaurav Kumar"
|
804
|
+
}
|
805
|
+
```
|
806
|
+
-------------------------------------------------------------------------------------------------------
|
807
|
+
|
808
|
+
### Fetch payment methods (Third party validation)
|
809
|
+
|
810
|
+
```rb
|
811
|
+
Razorpay.setup('key', '') # Use Only razorpay key
|
812
|
+
|
813
|
+
Razorpay::PaymentMethods.all()
|
814
|
+
```
|
815
|
+
|
816
|
+
**Response:** <br>
|
817
|
+
please refer this [doc](https://razorpay.com/docs/payments/third-party-validation/s2s-integration/methods-api/#fetch-payment-methods) for response
|
818
|
+
|
819
|
+
```
|
820
|
+
-------------------------------------------------------------------------------------------------------
|
821
|
+
|
822
|
+
|
633
823
|
**PN: * indicates mandatory fields**
|
634
824
|
<br>
|
635
825
|
<br>
|
data/documents/paymentLink.md
CHANGED
@@ -76,12 +76,15 @@ Razorpay::PaymentLink.create(para_attr.to_json)
|
|
76
76
|
|upi_link* | boolean | boolean Must be set to true // to creating UPI Payment Link only |
|
77
77
|
|amount* | integer | Amount to be paid using the Payment Link. |
|
78
78
|
|currency | string | A three-letter ISO code for the currency in which you want to accept the payment. For example, INR. |
|
79
|
+
|accept_partial | boolean | Indicates whether customers can make partial payments using the Payment Link. Possible values: true - Customer can make partial payments. false (default) - Customer cannot make partial payments. // UPI Payment Link is not supported partial payment |
|
79
80
|
|description | string | A brief description of the Payment Link |
|
80
|
-
|
|
81
|
-
|
|
81
|
+
|first_min_partial_amount | integer |Minimum amount, in currency subunits, that must be paid by the customer as the first partial payment. // UPI Payment Link is not supported partial payment |
|
82
|
+
|reference_id | string | Reference number tagged to a Payment Link. |
|
83
|
+
|customer | object | All parameters listed [here](https://razorpay.com/docs/api/payments/payment-links/#sample-codes-for-standard-payment-links) are supported |
|
82
84
|
|expire_by | integer | Timestamp, in Unix, at which the Payment Link will expire. By default, a Payment Link will be valid for six months from the date of creation. |
|
83
85
|
|notify | object | sms or email (boolean) |
|
84
|
-
|notes | json object | Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”
|
86
|
+
|notes | json object | Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty” |
|
87
|
+
|
85
88
|
|
86
89
|
**Response:**
|
87
90
|
For create payment link response please click [here](https://razorpay.com/docs/api/payment-links/#create-payment-link)
|
@@ -136,7 +139,7 @@ paymentLinkId = "plink_ExjpAUN3gVHrPJ"
|
|
136
139
|
para_attr = {
|
137
140
|
"reference_id": "TS35",
|
138
141
|
"expire_by": 1653347540,
|
139
|
-
"reminder_enable":false,
|
142
|
+
"reminder_enable": false,
|
140
143
|
"notes":{
|
141
144
|
"policy_name": "Jeevan Saral"
|
142
145
|
}
|
@@ -208,14 +211,15 @@ Razorpay::PaymentLink.notify_by(paymentLinkId, medium)
|
|
208
211
|
```rb
|
209
212
|
|
210
213
|
para_attr = {
|
211
|
-
"amount":
|
214
|
+
"amount": 1500,
|
212
215
|
"currency": "INR",
|
213
216
|
"accept_partial": false,
|
214
|
-
"
|
217
|
+
"reference_id": "#aasasw8",
|
218
|
+
"description": "Payment for policy no #23456",
|
215
219
|
"customer": {
|
216
220
|
"name": "Gaurav Kumar",
|
217
|
-
"
|
218
|
-
"
|
221
|
+
"contact": "+919999999999",
|
222
|
+
"email": "gaurav.kumar@example.com"
|
219
223
|
},
|
220
224
|
"notify": {
|
221
225
|
"sms": true,
|
@@ -223,20 +227,34 @@ para_attr = {
|
|
223
227
|
},
|
224
228
|
"reminder_enable": true,
|
225
229
|
"options": {
|
226
|
-
"order":
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
"
|
233
|
-
|
230
|
+
"order": {
|
231
|
+
"transfers": [
|
232
|
+
{
|
233
|
+
"account": "acc_CPRsN1LkFccllA",
|
234
|
+
"amount": 500,
|
235
|
+
"currency": "INR",
|
236
|
+
"notes": {
|
237
|
+
"branch": "Acme Corp Bangalore North",
|
238
|
+
"name": "Bhairav Kumar"
|
239
|
+
},
|
240
|
+
"linked_account_notes": [
|
241
|
+
"branch"
|
242
|
+
]
|
243
|
+
},
|
244
|
+
{
|
245
|
+
"account": "acc_CNo3jSI8OkFJJJ",
|
246
|
+
"amount": 500,
|
247
|
+
"currency": "INR",
|
248
|
+
"notes": {
|
249
|
+
"branch": "Acme Corp Bangalore South",
|
250
|
+
"name": "Saurav Kumar"
|
251
|
+
},
|
234
252
|
"linked_account_notes": [
|
235
253
|
"branch"
|
236
254
|
]
|
237
255
|
}
|
238
|
-
|
239
|
-
|
256
|
+
]
|
257
|
+
}
|
240
258
|
}
|
241
259
|
}
|
242
260
|
|
@@ -851,7 +869,7 @@ Razorpay::PaymentLink.create(para_attr.to_json)
|
|
851
869
|
|customer | object | name, email, contact |
|
852
870
|
|notify | object | sms or email (boolean) |
|
853
871
|
|reminder_enable | boolean | To disable reminders for a Payment Link, pass reminder_enable as false |
|
854
|
-
|options* | object |
|
872
|
+
|options* | object | All parameters listed [here](https://razorpay.com/docs/api/payments/payment-links/v1/customise/read-only/#request-parameters) are supported |
|
855
873
|
|
856
874
|
**Response:**
|
857
875
|
```json
|
data/documents/plan.md
CHANGED
@@ -32,8 +32,8 @@ Razorpay::Plan.create(para_attr)
|
|
32
32
|
|-----------------|---------|------------------------------------------------------------------------------|
|
33
33
|
| period* | string | Used together with `interval` to define how often the customer should be charged.Possible values:<br>1.`daily` <br>2.`weekly`<br>3.`monthly` <br>4.`yearly` |
|
34
34
|
| interval* | string | Used together with `period` to define how often the customer should be charged |
|
35
|
-
| items* |
|
36
|
-
| notes |
|
35
|
+
| items* | object | Details of the plan. For more details please refer [here](https://razorpay.com/docs/api/subscriptions/#create-a-plan) |
|
36
|
+
| notes | object | Notes you can enter for the contact for future reference. |
|
37
37
|
|
38
38
|
**Response:**
|
39
39
|
```json
|
@@ -141,7 +141,7 @@ Razorpay::Plan.fetch(planId)
|
|
141
141
|
|
142
142
|
| Name | Type | Description |
|
143
143
|
|-------|-----------|--------------------------------------------------|
|
144
|
-
| planId | string | The id of the plan to be fetched |
|
144
|
+
| planId* | string | The id of the plan to be fetched |
|
145
145
|
|
146
146
|
**Response:**
|
147
147
|
```json
|