razorpay 2.4.0 → 3.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. checksums.yaml +4 -4
  2. data/.cursorignore +174 -0
  3. data/.github/dependabot.yml +8 -0
  4. data/.github/pull_request_template.md +8 -0
  5. data/.github/workflows/ci.yml +80 -0
  6. data/.github/workflows/ruby.yml +38 -0
  7. data/CHANGELOG.md +85 -1
  8. data/README.md +48 -137
  9. data/documents/Invoice.md +539 -0
  10. data/documents/account.md +449 -0
  11. data/documents/addon.md +191 -0
  12. data/documents/card.md +655 -0
  13. data/documents/customer.md +405 -0
  14. data/documents/dispute.md +301 -0
  15. data/documents/documents.md +65 -0
  16. data/documents/emandate.md +492 -0
  17. data/documents/fund.md +89 -0
  18. data/documents/items.md +208 -0
  19. data/documents/oauth_token.md +142 -0
  20. data/documents/order.md +352 -0
  21. data/documents/papernach.md +738 -0
  22. data/documents/payment.md +1122 -0
  23. data/documents/paymentLink.md +1063 -0
  24. data/documents/paymentVerification.md +79 -0
  25. data/documents/plan.md +184 -0
  26. data/documents/productConfiguration.md +444 -0
  27. data/documents/qrcode.md +439 -0
  28. data/documents/refund.md +325 -0
  29. data/documents/registerEmandate.md +452 -0
  30. data/documents/registerNach.md +653 -0
  31. data/documents/settlement.md +478 -0
  32. data/documents/stakeholder.md +334 -0
  33. data/documents/subscriptions.md +752 -0
  34. data/documents/tokens.md +407 -0
  35. data/documents/transfers.md +821 -0
  36. data/documents/upi.md +545 -0
  37. data/documents/virtualAccount.md +591 -0
  38. data/documents/webhook.md +224 -0
  39. data/lib/razorpay/account.rb +39 -0
  40. data/lib/razorpay/addon.rb +9 -1
  41. data/lib/razorpay/card.rb +4 -0
  42. data/lib/razorpay/constants.rb +7 -2
  43. data/lib/razorpay/customer.rb +31 -0
  44. data/lib/razorpay/dispute.rb +26 -0
  45. data/lib/razorpay/document.rb +19 -0
  46. data/lib/razorpay/fund_account.rb +19 -0
  47. data/lib/razorpay/iin.rb +15 -0
  48. data/lib/razorpay/invoice.rb +8 -0
  49. data/lib/razorpay/item.rb +34 -0
  50. data/lib/razorpay/oauth_token.rb +109 -0
  51. data/lib/razorpay/order.rb +19 -1
  52. data/lib/razorpay/payload_validator.rb +93 -0
  53. data/lib/razorpay/payment.rb +64 -0
  54. data/lib/razorpay/payment_link.rb +36 -0
  55. data/lib/razorpay/payment_method.rb +17 -0
  56. data/lib/razorpay/product.rb +37 -0
  57. data/lib/razorpay/qr_code.rb +34 -0
  58. data/lib/razorpay/refund.rb +4 -0
  59. data/lib/razorpay/request.rb +50 -26
  60. data/lib/razorpay/settlement.rb +39 -0
  61. data/lib/razorpay/stakeholder.rb +39 -0
  62. data/lib/razorpay/subscription.rb +24 -0
  63. data/lib/razorpay/subscription_registration.rb +16 -0
  64. data/lib/razorpay/token.rb +28 -0
  65. data/lib/razorpay/transfer.rb +39 -0
  66. data/lib/razorpay/utility.rb +41 -6
  67. data/lib/razorpay/validation_config.rb +11 -0
  68. data/lib/razorpay/virtual_account.rb +15 -7
  69. data/lib/razorpay/webhook.rb +50 -0
  70. data/lib/razorpay.rb +24 -1
  71. data/razorpay-ruby.gemspec +2 -1
  72. data/test/fixtures/addon_collection.json +60 -0
  73. data/test/fixtures/create_json_payment.json +13 -0
  74. data/test/fixtures/delete_token.json +3 -0
  75. data/test/fixtures/dispute_collection.json +67 -0
  76. data/test/fixtures/dispute_error.json +10 -0
  77. data/test/fixtures/document_error.json +10 -0
  78. data/test/fixtures/downtimes_collection.json +21 -0
  79. data/test/fixtures/empty.json +2 -0
  80. data/test/fixtures/error_customer.json +10 -0
  81. data/test/fixtures/error_eligibility.json +10 -0
  82. data/test/fixtures/error_eligibility_check.json +10 -0
  83. data/test/fixtures/fake_account.json +78 -0
  84. data/test/fixtures/fake_addon.json +3 -3
  85. data/test/fixtures/fake_bank_account.json +9 -0
  86. data/test/fixtures/fake_card_reference.json +5 -0
  87. data/test/fixtures/fake_create_upi_payment.json +3 -0
  88. data/test/fixtures/fake_direct_transfer.json +32 -0
  89. data/test/fixtures/fake_dispute.json +29 -0
  90. data/test/fixtures/fake_document.json +9 -0
  91. data/test/fixtures/fake_downtime.json +14 -0
  92. data/test/fixtures/fake_eligiblity.json +79 -0
  93. data/test/fixtures/fake_fulfillment.json +10 -0
  94. data/test/fixtures/fake_fund_account.json +18 -0
  95. data/test/fixtures/fake_iin_token.json +23 -0
  96. data/test/fixtures/fake_instant_settlement.json +19 -0
  97. data/test/fixtures/fake_item.json +9 -0
  98. data/test/fixtures/fake_oauth_token.json +8 -0
  99. data/test/fixtures/fake_order_transfers.json +88 -0
  100. data/test/fixtures/fake_otp_generate.json +19 -0
  101. data/test/fixtures/fake_otp_resend.json +7 -0
  102. data/test/fixtures/fake_otp_submit.json +5 -0
  103. data/test/fixtures/fake_payment_expanded_details.json +38 -0
  104. data/test/fixtures/fake_payment_expanded_details_card.json +50 -0
  105. data/test/fixtures/fake_payment_link.json +40 -0
  106. data/test/fixtures/fake_pending_update.json +30 -0
  107. data/test/fixtures/fake_product.json +138 -0
  108. data/test/fixtures/fake_qrcode.json +20 -0
  109. data/test/fixtures/fake_qrcode_close.json +22 -0
  110. data/test/fixtures/fake_recurring.json +5 -0
  111. data/test/fixtures/fake_refund.json +1 -1
  112. data/test/fixtures/fake_revoke_token.json +3 -0
  113. data/test/fixtures/fake_rto.json +15 -0
  114. data/test/fixtures/fake_settlement.json +11 -0
  115. data/test/fixtures/fake_settlement_on_demand.json +39 -0
  116. data/test/fixtures/fake_stakeholder.json +29 -0
  117. data/test/fixtures/fake_subscription_pause.json +19 -0
  118. data/test/fixtures/fake_subscription_registration.json +91 -0
  119. data/test/fixtures/fake_subscription_resume.json +19 -0
  120. data/test/fixtures/fake_token.json +31 -0
  121. data/test/fixtures/fake_tokenise_customer.json +40 -0
  122. data/test/fixtures/fake_transfer.json +18 -0
  123. data/test/fixtures/fake_transfer_reverse.json +15 -0
  124. data/test/fixtures/fake_update_payment.json +39 -0
  125. data/test/fixtures/fake_validate_vpa.json +5 -0
  126. data/test/fixtures/fake_virtual_account_allowed.json +46 -0
  127. data/test/fixtures/fake_virtual_account_receiver.json +46 -0
  128. data/test/fixtures/fake_webhook.json +79 -0
  129. data/test/fixtures/fake_webhook_by_account_id.json +22 -0
  130. data/test/fixtures/fetch_tnc.json +11 -0
  131. data/test/fixtures/fund_collection.json +20 -0
  132. data/test/fixtures/item_collection.json +24 -0
  133. data/test/fixtures/order_error.json +10 -0
  134. data/test/fixtures/payment_collection.json +1 -1
  135. data/test/fixtures/payment_error.json +10 -0
  136. data/test/fixtures/payment_link_collection.json +43 -0
  137. data/test/fixtures/payment_link_response.json +3 -0
  138. data/test/fixtures/payment_methods_collection.json +149 -0
  139. data/test/fixtures/qrcode_collection.json +50 -0
  140. data/test/fixtures/qrcode_payments_collection.json +74 -0
  141. data/test/fixtures/reversals_collection.json +22 -0
  142. data/test/fixtures/settlement_collection.json +26 -0
  143. data/test/fixtures/settlement_instant_collection.json +84 -0
  144. data/test/fixtures/settlement_report_collection.json +117 -0
  145. data/test/fixtures/stakeholder_collection.json +35 -0
  146. data/test/fixtures/success.json +3 -0
  147. data/test/fixtures/tokens_collection.json +36 -0
  148. data/test/fixtures/transfer_error.json +10 -0
  149. data/test/fixtures/transfer_settlements_collection.json +38 -0
  150. data/test/fixtures/transfers_collection.json +41 -0
  151. data/test/fixtures/webhook_by_account_collection.json +35 -0
  152. data/test/fixtures/webhook_collection.json +85 -0
  153. data/test/razorpay/test_account.rb +134 -0
  154. data/test/razorpay/test_addon.rb +19 -15
  155. data/test/razorpay/test_card.rb +6 -0
  156. data/test/razorpay/test_customer.rb +132 -3
  157. data/test/razorpay/test_dispute.rb +98 -0
  158. data/test/razorpay/test_document.rb +27 -0
  159. data/test/razorpay/test_fund_account.rb +42 -0
  160. data/test/razorpay/test_iin.rb +23 -0
  161. data/test/razorpay/test_invoice.rb +15 -2
  162. data/test/razorpay/test_item.rb +66 -0
  163. data/test/razorpay/test_oauth_token.rb +105 -0
  164. data/test/razorpay/test_order.rb +66 -1
  165. data/test/razorpay/test_payload_validator.rb +61 -0
  166. data/test/razorpay/test_payment.rb +251 -9
  167. data/test/razorpay/test_payment_link.rb +83 -0
  168. data/test/razorpay/test_plan.rb +2 -2
  169. data/test/razorpay/test_product.rb +67 -0
  170. data/test/razorpay/test_qr_code.rb +63 -0
  171. data/test/razorpay/test_razorpay.rb +19 -2
  172. data/test/razorpay/test_refund.rb +16 -2
  173. data/test/razorpay/test_settlement.rb +76 -0
  174. data/test/razorpay/test_stakeholder.rb +87 -0
  175. data/test/razorpay/test_subscription.rb +72 -9
  176. data/test/razorpay/test_subscription_registration.rb +58 -0
  177. data/test/razorpay/test_token.rb +66 -0
  178. data/test/razorpay/test_transfer.rb +94 -0
  179. data/test/razorpay/test_utility.rb +72 -4
  180. data/test/razorpay/test_virtual_account.rb +64 -17
  181. data/test/razorpay/test_webhook.rb +132 -0
  182. data/test/test_helper.rb +8 -0
  183. metadata +265 -10
  184. data/.travis.yml +0 -22
  185. data/test/razorpay/test_errors.rb +0 -19
@@ -0,0 +1,79 @@
1
+ {
2
+ "amount": "500000",
3
+ "customer": {
4
+ "id": "KkBhM9EC1Y0HTm",
5
+ "contact": "+918220722114"
6
+ },
7
+ "instruments": [
8
+ {
9
+ "method": "emi",
10
+ "issuer": "HDFC",
11
+ "type": "debit",
12
+ "eligibility_req_id": "elig_KkCNLzlNeMYQyZ",
13
+ "eligibility": {
14
+ "status": "eligible"
15
+ }
16
+ },
17
+ {
18
+ "method": "paylater",
19
+ "provider": "getsimpl",
20
+ "eligibility_req_id": "elig_KkCNLzlNeMYQyZ",
21
+ "eligibility": {
22
+ "status": "eligible"
23
+ }
24
+ },
25
+ {
26
+ "method": "paylater",
27
+ "provider": "icic",
28
+ "eligibility_req_id": "elig_KkCNLzlNeMYQyZ",
29
+ "eligibility": {
30
+ "status": "eligible"
31
+ }
32
+ },
33
+ {
34
+ "method": "cardless_emi",
35
+ "provider": "walnut369",
36
+ "eligibility_req_id": "elig_KkCNLzlNeMYQyZ",
37
+ "eligibility": {
38
+ "status": "ineligible",
39
+ "error": {
40
+ "code": "GATEWAY_ERROR",
41
+ "description": "The customer has not been approved by the partner.",
42
+ "source": "business",
43
+ "step": "inquiry",
44
+ "reason": "user_not_approved"
45
+ }
46
+ }
47
+ },
48
+ {
49
+ "method": "cardless_emi",
50
+ "provider": "zestmoney",
51
+ "eligibility_req_id": "elig_KkCNLzlNeMYQyZ",
52
+ "eligibility": {
53
+ "status": "ineligible",
54
+ "error": {
55
+ "code": "GATEWAY_ERROR",
56
+ "description": "The customer has exhausted their credit limit.",
57
+ "source": "business",
58
+ "step": "inquiry",
59
+ "reason": "credit_limit_exhausted"
60
+ }
61
+ }
62
+ },
63
+ {
64
+ "method": "paylater",
65
+ "provider": "lazypay",
66
+ "eligibility_req_id": "elig_KkCNLzlNeMYQyZ",
67
+ "eligibility": {
68
+ "status": "ineligible",
69
+ "error": {
70
+ "code": "GATEWAY_ERROR",
71
+ "description": "The order amount is less than the minimum transaction amount.",
72
+ "source": "business",
73
+ "step": "inquiry",
74
+ "reason": "min_amt_required"
75
+ }
76
+ }
77
+ }
78
+ ]
79
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "entity": "order.fulfillment",
3
+ "order_id": "EKwxwAgItXXXX",
4
+ "payment_method": "upi",
5
+ "shipping": {
6
+ "waybill": "123456789",
7
+ "status": "rto",
8
+ "provider": "Bluedart"
9
+ }
10
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "id": "fa_J8B38pGr1Tfv8k",
3
+ "entity": "fund_account",
4
+ "customer_id": "cust_J3oSNi1KgzqVEX",
5
+ "account_type": "bank_account",
6
+ "bank_account": {
7
+ "ifsc": "HDFC0000053",
8
+ "bank_name": "HDFC Bank",
9
+ "name": "Gaurav Kumar",
10
+ "notes": [
11
+
12
+ ],
13
+ "account_number": "11214311215411"
14
+ },
15
+ "batch_id": null,
16
+ "active": true,
17
+ "created_at": 1647524681
18
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "iin": "411111",
3
+ "entity": "iin",
4
+ "network": "Visa",
5
+ "type": "credit",
6
+ "sub_type": "consumer",
7
+ "card_iin": "null",
8
+ "issuer_code": "unknown",
9
+ "issuer_name": "unknown",
10
+ "international": true,
11
+ "tokenised": false,
12
+ "emi": {
13
+ "available": false
14
+ },
15
+ "recurring": {
16
+ "available": true
17
+ },
18
+ "authentication_types": [
19
+ {
20
+ "type": "3ds"
21
+ }
22
+ ]
23
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "id": "setlod_FNj7g2YS5J67Rz",
3
+ "entity": "settlement.ondemand",
4
+ "amount_requested": 200000,
5
+ "amount_settled": 199410,
6
+ "amount_pending": 0,
7
+ "amount_reversed": 0,
8
+ "fees": 590,
9
+ "tax": 90,
10
+ "currency": "INR",
11
+ "settle_full_balance": false,
12
+ "status": "processed",
13
+ "description": "Need this to make vendor payments.",
14
+ "notes": {
15
+ "notes_key_1": "Tea, Earl Grey, Hot",
16
+ "notes_key_2": "Tea, Earl Grey… decaf."
17
+ },
18
+ "created_at": 1596771429
19
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "id": "item_JDcbIdX9xojCje",
3
+ "active": true,
4
+ "name": "English Augusts",
5
+ "description": "An indian story, Prize winner.",
6
+ "amount": 20000,
7
+ "unit_amount": 20000,
8
+ "currency": "INR"
9
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "public_token": "rzp_test_oauth_9xu1rkZqoXlClS",
3
+ "token_type": "Bearer",
4
+ "expires_in": 7862400,
5
+ "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IkY1Z0NQYkhhRzRjcUpnIn0.eyJhdWQiOiJGNFNNeEgxanMxbkpPZiIsImp0aSI6IkY1Z0NQYkhhRzRjcUpnIiwiaWF0IjoxNTkyODMxMDExLCJuYmYiOjE1OTI4MzEwMTEsInN1YiI6IiIsImV4cCI6MTYwMDc3OTgxMSwidXNlcl9pZCI6IkYycVBpejJEdzRPRVFwIiwibWVyY2hhbnRfaWQiOiJGMnFQaVZ3N0lNV01GSyIsInNjb3BlcyI6WyJyZWFkX29ubHkiXX0.Wwqt5czhoWpVzP5_aoiymKXoGj-ydo-4A_X2jf_7rrSvk4pXdqzbA5BMrHxPdPbeFQWV6vsnsgbf99Q3g-W4kalHyH67LfAzc3qnJ-mkYDkFY93tkeG-MCco6GJW-Jm8xhaV9EPUak7z9J9jcdluu9rNXYMtd5qxD8auyRYhEgs",
6
+ "refresh_token": "def50200f42e07aded65a323f6c53181d802cc797b62cc5e78dd8038d6dff253e5877da9ad32f463a4da0ad895e3de298cbce40e162202170e763754122a6cb97910a1f58e2378ee3492dc295e1525009cccc45635308cce8575bdf373606c453ebb5eb2bec062ca197ac23810cf9d6cf31fbb9fcf5b7d4de9bf524c89a4aa90599b0151c9e4e2fa08acb6d2fe17f30a6cfecdfd671f090787e821f844e5d36f5eacb7dfb33d91e83b18216ad0ebeba2bef7721e10d436c3984daafd8654ed881c581d6be0bdc9ebfaee0dc5f9374d7184d60aae5aa85385690220690e21bc93209fb8a8cc25a6abf1108d8277f7c3d38217b47744d7",
7
+ "razorpay_account_id": "acc_Dhk2qDbmu6FwZH"
8
+ }
@@ -0,0 +1,88 @@
1
+ {
2
+ "id":"order_50sX9hGHZJvjjI",
3
+ "entity":"order",
4
+ "amount":1000,
5
+ "amount_paid":1000,
6
+ "amount_due":0,
7
+ "currency":"INR",
8
+ "receipt":null,
9
+ "offer_id":null,
10
+ "status":"paid",
11
+ "attempts":1,
12
+ "notes":[
13
+
14
+ ],
15
+ "created_at":1570794714,
16
+ "transfers":{
17
+ "entity":"collection",
18
+ "count":2,
19
+ "items":[
20
+ {
21
+ "id":"trf_DSkl2lXWbiADZG",
22
+ "entity":"transfer",
23
+ "transfer_status":"processed",
24
+ "settlement_status":null,
25
+ "source":"order_DSkl2lBNvueOly",
26
+ "recipient":"acc_CNo3jSI8OkFJJJ",
27
+ "amount":500,
28
+ "currency":"INR",
29
+ "amount_reversed":0,
30
+ "notes":{
31
+ "branch":"Acme Corp Bangalore North",
32
+ "name":"Gaurav Kumar"
33
+ },
34
+ "fees":2,
35
+ "tax":0,
36
+ "on_hold":true,
37
+ "on_hold_until":1670776632,
38
+ "recipient_settlement_id":null,
39
+ "created_at":1570794714,
40
+ "linked_account_notes":[
41
+ "Acme Corp Bangalore North"
42
+ ],
43
+ "processed_at":1570794772,
44
+ "error":{
45
+ "code":null,
46
+ "description":null,
47
+ "field":null,
48
+ "source":null,
49
+ "step":null,
50
+ "reason":null
51
+ }
52
+ },
53
+ {
54
+ "id":"trf_DSkl2pJE49IRc3",
55
+ "entity":"transfer",
56
+ "transfer_status":"pending",
57
+ "settlement_status":null,
58
+ "source":"order_DSkl2lBNvueOly",
59
+ "recipient":"acc_CMaomTz4o0FOFz",
60
+ "amount":500,
61
+ "currency":"INR",
62
+ "amount_reversed":0,
63
+ "notes":{
64
+ "branch":"Acme Corp Bangalore South",
65
+ "name":"Saurav Kumar"
66
+ },
67
+ "fees":2,
68
+ "tax":0,
69
+ "on_hold":false,
70
+ "on_hold_until":null,
71
+ "recipient_settlement_id":null,
72
+ "created_at":1570794714,
73
+ "linked_account_notes":[
74
+ "Acme Corp Bangalore South"
75
+ ],
76
+ "processed_at":null,
77
+ "error":{
78
+ "code":null,
79
+ "description":null,
80
+ "field":null,
81
+ "source":null,
82
+ "step":null,
83
+ "reason":null
84
+ }
85
+ }
86
+ ]
87
+ }
88
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "razorpay_payment_id": "pay_FVmAstJWfsD3SO",
3
+ "next": [
4
+ {
5
+ "action": "otp_submit",
6
+ "url": "https://api.razorpay.com/v1/payments/pay_FVmAstJWfsD3SO/otp_submit/ac2d415a8be7595de09a24b41661729fd9028fdc?key_id=<YOUR_KEY_ID>"
7
+ },
8
+ {
9
+ "action": "otp_resend",
10
+ "url": "https://api.razorpay.com/v1/payments/pay_FVmAstJWfsD3SO/otp_resend/json?key_id=<YOUR_KEY_ID>"
11
+ }
12
+ ],
13
+ "metadata": {
14
+ "issuer": "HDFC",
15
+ "network": "MC",
16
+ "last4": "1111",
17
+ "iin": "411111"
18
+ }
19
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "next": [
3
+ "otp_submit",
4
+ "otp_resend"
5
+ ],
6
+ "razorpay_payment_id": "fake_payment_id"
7
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "razorpay_payment_id": "fake_payment_id",
3
+ "razorpay_order_id": "order_9A33XWu170gUtm",
4
+ "razorpay_signature": "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d"
5
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "id": "fake_payment_id",
3
+ "entity": "payment",
4
+ "amount": 200000,
5
+ "currency": "INR",
6
+ "status": "authorized",
7
+ "order_id": null,
8
+ "invoice_id": null,
9
+ "international": false,
10
+ "method": "emi",
11
+ "amount_refunded": 0,
12
+ "refund_status": null,
13
+ "captured": false,
14
+ "description": null,
15
+ "card_id": "card_DG4ZdUO3xABb20",
16
+ "bank": "ICIC",
17
+ "wallet": null,
18
+ "vpa": null,
19
+ "email": "gaurav@example.com",
20
+ "contact": "+919972000005",
21
+ "notes": [],
22
+ "fee": null,
23
+ "tax": null,
24
+ "error_code": null,
25
+ "error_description": null,
26
+ "error_source": null,
27
+ "error_step": null,
28
+ "error_reason": null,
29
+ "emi": {
30
+ "issuer": "ICIC",
31
+ "rate": 1300,
32
+ "duration": 6
33
+ },
34
+ "acquirer_data": {
35
+ "auth_code": "828553"
36
+ },
37
+ "created_at": 1568026077
38
+ }
@@ -0,0 +1,50 @@
1
+ {
2
+ "id": "fake_payment_id",
3
+ "entity": "payment",
4
+ "amount": 100,
5
+ "currency": "INR",
6
+ "status": "failed",
7
+ "order_id": "order_H9o58N6qmLYQKC",
8
+ "invoice_id": null,
9
+ "terminal_id": "term_G5kJnYM9GhhLYT",
10
+ "international": false,
11
+ "method": "card",
12
+ "amount_refunded": 0,
13
+ "refund_status": null,
14
+ "captured": false,
15
+ "description": null,
16
+ "card_id": "card_H9oR0ocen1cmZq",
17
+ "card": {
18
+ "id": "card_H9oR0ocen1cmZq",
19
+ "entity": "card",
20
+ "name": "Gaurav",
21
+ "last4": "1213",
22
+ "network": "RuPay",
23
+ "type": "credit",
24
+ "issuer": "UTIB",
25
+ "international": false,
26
+ "emi": false,
27
+ "sub_type": "business"
28
+ },
29
+ "bank": null,
30
+ "wallet": null,
31
+ "vpa": null,
32
+ "email": "gaurav.kumar@example.com",
33
+ "contact": "+919000090000",
34
+ "notes": {
35
+ "email": "gaurav.kumar@example.com",
36
+ "phone": "09000090000"
37
+ },
38
+ "fee": null,
39
+ "tax": null,
40
+ "error_code": "BAD_REQUEST_ERROR",
41
+ "error_description": "Card issuer is invalid",
42
+ "error_source": "customer",
43
+ "error_step": "payment_authentication",
44
+ "error_reason": "incorrect_card_details",
45
+ "acquirer_data": {
46
+ "auth_code": null,
47
+ "authentication_reference_number": "100222021120200000000742753928"
48
+ },
49
+ "created_at": 1620807547
50
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "accept_partial": true,
3
+ "amount": 1000,
4
+ "amount_paid": 0,
5
+ "callback_method": "get",
6
+ "callback_url": "https://example-callback-url.com/",
7
+ "cancelled_at": 1647854430,
8
+ "created_at": 1647850784,
9
+ "currency": "INR",
10
+ "customer": {
11
+ "contact": "+919999999999",
12
+ "email": "gaurav.kumar@example.com",
13
+ "name": "Gaurav Kumar"
14
+ },
15
+ "description": "For XYZ purpose",
16
+ "expire_by": 0,
17
+ "expired_at": 0,
18
+ "first_min_partial_amount": 100,
19
+ "id": "plink_J9feMU9xqHQVWX",
20
+ "notes": {
21
+ "policy_name": "Jeevan Bima"
22
+ },
23
+ "notify": {
24
+ "email": true,
25
+ "sms": true
26
+ },
27
+ "payments": [
28
+
29
+ ],
30
+ "reference_id": "",
31
+ "reminder_enable": true,
32
+ "reminders": {
33
+ "status": "in_progress"
34
+ },
35
+ "short_url": "https://rzp.io/i/GIgR3hfGI",
36
+ "status": "cancelled",
37
+ "updated_at": 1647854430,
38
+ "upi_link": false,
39
+ "user_id": ""
40
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "id":"sub_00000000000002",
3
+ "entity":"subscription",
4
+ "plan_id":"plan_00000000000002",
5
+ "customer_id":"cust_00000000000002",
6
+ "status":"active",
7
+ "current_start":null,
8
+ "current_end":null,
9
+ "ended_at":null,
10
+ "quantity":3,
11
+ "notes":{
12
+ "notes_key_1":"Tea, Earl Grey, Hot",
13
+ "notes_key_2":"Tea, Earl Grey… decaf."
14
+ },
15
+ "charge_at":1580453311,
16
+ "start_at":1580453311,
17
+ "end_at":1606588200,
18
+ "auth_attempts":0,
19
+ "total_count":6,
20
+ "paid_count":0,
21
+ "customer_notify":false,
22
+ "created_at":1580283807,
23
+ "expire_by":1580626111,
24
+ "short_url":"https://rzp.io/i/yeDkUKy",
25
+ "has_scheduled_changes":false,
26
+ "change_scheduled_at":null,
27
+ "source": "api",
28
+ "offer_id":"offer_JHD834hjbxzhd38d",
29
+ "remaining_count":6
30
+ }
@@ -0,0 +1,138 @@
1
+ {
2
+ "requested_configuration": {
3
+ "payment_methods": []
4
+ },
5
+ "active_configuration": {
6
+ "payment_capture": {
7
+ "mode": "automatic",
8
+ "refund_speed": "normal",
9
+ "automatic_expiry_period": 7200
10
+ },
11
+ "settlements": {
12
+ "account_number": null,
13
+ "ifsc_code": null,
14
+ "beneficiary_name": null
15
+ },
16
+ "checkout": {
17
+ "theme_color": "#FFFFFF",
18
+ "flash_checkout": true
19
+ },
20
+ "refund": {
21
+ "default_refund_speed": "normal"
22
+ },
23
+ "notifications": {
24
+ "whatsapp": true,
25
+ "sms": false,
26
+ "email": [
27
+ "b963e252-1201-45b0-9c39-c53eceb0cfd6_load@gmail.com"
28
+ ]
29
+ },
30
+ "payment_methods": {
31
+ "netbanking": {
32
+ "enabled": true,
33
+ "instrument": [
34
+ {
35
+ "type": "retail",
36
+ "bank": [
37
+ "hdfc",
38
+ "sbin",
39
+ "utib",
40
+ "icic",
41
+ "scbl",
42
+ "yesb"
43
+ ]
44
+ }
45
+ ]
46
+ },
47
+ "wallet": {
48
+ "enabled": true,
49
+ "instrument": [
50
+ "airtelmoney",
51
+ "freecharge",
52
+ "jiomoney",
53
+ "olamoney",
54
+ "payzapp",
55
+ "mobikwik"
56
+ ]
57
+ },
58
+ "upi": {
59
+ "enabled": true,
60
+ "instrument": [
61
+ "upi"
62
+ ]
63
+ }
64
+ }
65
+ },
66
+ "requirements": [
67
+ {
68
+ "field_reference": "individual_proof_of_address",
69
+ "resolution_url": "/accounts/acc_prd_00000000000001/stakeholders/{stakeholderId}/documents",
70
+ "status": "required",
71
+ "reason_code": "document_missing"
72
+ },
73
+ {
74
+ "field_reference": "individual_proof_of_identification",
75
+ "resolution_url": "/accounts/acc_prd_00000000000001/stakeholders/{stakeholderId}/documents",
76
+ "status": "required",
77
+ "reason_code": "document_missing"
78
+ },
79
+ {
80
+ "field_reference": "business_proof_of_identification",
81
+ "resolution_url": "/accounts/acc_prd_00000000000001/documents",
82
+ "status": "required",
83
+ "reason_code": "document_missing"
84
+ },
85
+ {
86
+ "field_reference": "settlements.beneficiary_name",
87
+ "resolution_url": "/accounts/acc_prd_00000000000001/products/acc_prd_HEgNpywUFctQ9e",
88
+ "status": "required",
89
+ "reason_code": "field_missing"
90
+ },
91
+ {
92
+ "field_reference": "settlements.account_number",
93
+ "resolution_url": "/accounts/acc_prd_00000000000001/products/acc_prd_HEgNpywUFctQ9e",
94
+ "status": "required",
95
+ "reason_code": "field_missing"
96
+ },
97
+ {
98
+ "field_reference": "settlements.ifsc_code",
99
+ "resolution_url": "/accounts/acc_prd_00000000000001/products/acc_prd_HEgNpywUFctQ9e",
100
+ "status": "required",
101
+ "reason_code": "field_missing"
102
+ },
103
+ {
104
+ "field_reference": "contact_name",
105
+ "resolution_url": "/accounts/acc_prd_00000000000001",
106
+ "status": "required",
107
+ "reason_code": "field_missing"
108
+ },
109
+ {
110
+ "field_reference": "name",
111
+ "resolution_url": "/accounts/acc_prd_00000000000001/stakeholders",
112
+ "status": "required",
113
+ "reason_code": "field_missing"
114
+ },
115
+ {
116
+ "field_reference": "customer_facing_business_name",
117
+ "resolution_url": "/accounts/acc_prd_00000000000001",
118
+ "status": "required",
119
+ "reason_code": "field_missing"
120
+ },
121
+ {
122
+ "field_reference": "kyc.pan",
123
+ "resolution_url": "/accounts/acc_prd_00000000000001/stakeholders",
124
+ "status": "required",
125
+ "reason_code": "field_missing"
126
+ }
127
+ ],
128
+ "tnc": {
129
+ "id": "tnc_00000000000001",
130
+ "accepted": true,
131
+ "accepted_at": 1641550798
132
+ },
133
+ "id": "acc_prd_00000000000001",
134
+ "account_id": "acc_00000000000001",
135
+ "product_name": "payment_gateway",
136
+ "activation_status": "needs_clarification",
137
+ "requested_at": 1625478849
138
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "id": "qr_HMsVL8HOpbMcjU",
3
+ "entity": "qr_code",
4
+ "created_at": 1623660301,
5
+ "name": "Store_1",
6
+ "usage": "single_use",
7
+ "type": "upi_qr",
8
+ "image_url": "https://rzp.io/i/BWcUVrLp",
9
+ "payment_amount": 300,
10
+ "status": "active",
11
+ "description": "For Store 1",
12
+ "fixed_amount": true,
13
+ "payments_amount_received": 0,
14
+ "payments_count_received": 0,
15
+ "notes": {
16
+ "purpose": "Test UPI QR code notes"
17
+ },
18
+ "customer_id": "cust_HKsR5se84c5LTO",
19
+ "close_by": 1681615838
20
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "id": "qr_HMsVL8HOpbMcjU",
3
+ "entity": "qr_code",
4
+ "created_at": 1623660301,
5
+ "name": "Store_1",
6
+ "usage": "single_use",
7
+ "type": "upi_qr",
8
+ "image_url": "https://rzp.io/i/BWcUVrLp",
9
+ "payment_amount": 300,
10
+ "status": "closed",
11
+ "description": "For Store 1",
12
+ "fixed_amount": true,
13
+ "payments_amount_received": 0,
14
+ "payments_count_received": 0,
15
+ "notes": {
16
+ "purpose": "Test UPI QR code notes"
17
+ },
18
+ "customer_id": "cust_HKsR5se84c5LTO",
19
+ "close_by": 1681615838,
20
+ "closed_at": 1623660445,
21
+ "close_reason": "on_demand"
22
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "razorpay_payment_id" : "pay_1Aa00000000001",
3
+ "razorpay_order_id" : "order_1Aa00000000001",
4
+ "razorpay_signature" : "9ef4dffbfd84f1318f6739a3ce19f9d85851857ae648f114332d8401e0949a3d"
5
+ }
@@ -3,6 +3,6 @@
3
3
  "entity": "refund",
4
4
  "amount": 2000,
5
5
  "currency": "INR",
6
- "payment_id": "fake_payment_id",
6
+ "payment_id": "pay_FFX5FdEYx8jPwA",
7
7
  "created_at": 1500826750
8
8
  }
@@ -0,0 +1,3 @@
1
+ {
2
+ "message": "Token Revoked"
3
+ }