razorpay 2.4.1 → 3.0.0
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.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +8 -0
- data/.github/workflows/ruby.yml +38 -0
- data/CHANGELOG.md +19 -0
- data/README.md +29 -140
- data/documents/Invoice.md +531 -0
- data/documents/addon.md +169 -0
- data/documents/card.md +611 -0
- data/documents/customer.md +161 -0
- data/documents/emandate.md +484 -0
- data/documents/fund.md +87 -0
- data/documents/items.md +184 -0
- data/documents/order.md +230 -0
- data/documents/papernach.md +718 -0
- data/documents/payment.md +636 -0
- data/documents/paymentLink.md +1045 -0
- data/documents/paymentVerification.md +79 -0
- data/documents/plan.md +184 -0
- data/documents/qrcode.md +441 -0
- data/documents/refund.md +324 -0
- data/documents/registerEmandate.md +445 -0
- data/documents/registerNach.md +661 -0
- data/documents/settlement.md +477 -0
- data/documents/subscriptions.md +750 -0
- data/documents/tokens.md +208 -0
- data/documents/transfers.md +684 -0
- data/documents/upi.md +548 -0
- data/documents/virtualAccount.md +586 -0
- data/lib/razorpay/addon.rb +4 -0
- data/lib/razorpay/constants.rb +1 -1
- data/lib/razorpay/customer.rb +15 -0
- data/lib/razorpay/fund_account.rb +19 -0
- data/lib/razorpay/invoice.rb +8 -0
- data/lib/razorpay/item.rb +34 -0
- data/lib/razorpay/order.rb +10 -0
- data/lib/razorpay/payment.rb +52 -0
- data/lib/razorpay/payment_link.rb +36 -0
- data/lib/razorpay/qr_code.rb +34 -0
- data/lib/razorpay/refund.rb +4 -0
- data/lib/razorpay/request.rb +13 -6
- data/lib/razorpay/settlement.rb +39 -0
- data/lib/razorpay/subscription.rb +24 -0
- data/lib/razorpay/subscription_registration.rb +16 -0
- data/lib/razorpay/transfer.rb +35 -0
- data/lib/razorpay/utility.rb +7 -2
- data/lib/razorpay/virtual_account.rb +14 -6
- data/lib/razorpay.rb +7 -0
- data/test/fixtures/addon_collection.json +60 -0
- data/test/fixtures/create_json_payment.json +13 -0
- data/test/fixtures/delete_token.json +3 -0
- data/test/fixtures/downtimes_collection.json +21 -0
- data/test/fixtures/empty.json +2 -0
- data/test/fixtures/fake_addon.json +3 -3
- data/test/fixtures/fake_direct_transfer.json +32 -0
- data/test/fixtures/fake_downtime.json +14 -0
- data/test/fixtures/fake_fund_account.json +18 -0
- data/test/fixtures/fake_instant_settlement.json +19 -0
- data/test/fixtures/fake_item.json +9 -0
- data/test/fixtures/fake_order_transfers.json +88 -0
- data/test/fixtures/fake_otp_generate.json +19 -0
- data/test/fixtures/fake_otp_resend.json +7 -0
- data/test/fixtures/fake_otp_submit.json +5 -0
- data/test/fixtures/fake_payment_link.json +40 -0
- data/test/fixtures/fake_pending_update.json +30 -0
- data/test/fixtures/fake_qrcode.json +20 -0
- data/test/fixtures/fake_qrcode_close.json +22 -0
- data/test/fixtures/fake_recurring.json +5 -0
- data/test/fixtures/fake_refund.json +1 -1
- data/test/fixtures/fake_settlement.json +11 -0
- data/test/fixtures/fake_settlement_on_demand.json +39 -0
- data/test/fixtures/fake_subscription_pause.json +19 -0
- data/test/fixtures/fake_subscription_registration.json +91 -0
- data/test/fixtures/fake_subscription_resume.json +19 -0
- data/test/fixtures/fake_token.json +31 -0
- data/test/fixtures/fake_transfer.json +18 -0
- data/test/fixtures/fake_transfer_reverse.json +15 -0
- data/test/fixtures/fake_update_payment.json +39 -0
- data/test/fixtures/fake_virtual_account_allowed.json +46 -0
- data/test/fixtures/fake_virtual_account_receiver.json +46 -0
- data/test/fixtures/fund_collection.json +20 -0
- data/test/fixtures/item_collection.json +24 -0
- data/test/fixtures/payment_collection.json +1 -1
- data/test/fixtures/payment_link_collection.json +43 -0
- data/test/fixtures/payment_link_response.json +3 -0
- data/test/fixtures/qrcode_collection.json +50 -0
- data/test/fixtures/qrcode_payments_collection.json +74 -0
- data/test/fixtures/settlement_collection.json +26 -0
- data/test/fixtures/settlement_instant_collection.json +84 -0
- data/test/fixtures/settlement_report_collection.json +117 -0
- data/test/fixtures/success.json +3 -0
- data/test/fixtures/tokens_collection.json +36 -0
- data/test/fixtures/transfer_settlements_collection.json +38 -0
- data/test/fixtures/transfers_collection.json +41 -0
- data/test/razorpay/test_addon.rb +15 -15
- data/test/razorpay/test_customer.rb +27 -3
- data/test/razorpay/test_fund_account.rb +42 -0
- data/test/razorpay/test_invoice.rb +15 -2
- data/test/razorpay/test_item.rb +66 -0
- data/test/razorpay/test_order.rb +24 -1
- data/test/razorpay/test_payment.rb +184 -8
- data/test/razorpay/test_payment_link.rb +83 -0
- data/test/razorpay/test_plan.rb +2 -2
- data/test/razorpay/test_qr_code.rb +63 -0
- data/test/razorpay/test_refund.rb +16 -2
- data/test/razorpay/test_settlement.rb +76 -0
- data/test/razorpay/test_subscription.rb +72 -9
- data/test/razorpay/test_subscription_registration.rb +58 -0
- data/test/razorpay/test_transfer.rb +77 -0
- data/test/razorpay/test_utility.rb +32 -0
- data/test/razorpay/test_virtual_account.rb +64 -17
- data/test/test_helper.rb +6 -0
- metadata +138 -9
- data/.travis.yml +0 -22
- data/test/razorpay/test_errors.rb +0 -19
data/lib/razorpay/order.rb
CHANGED
|
@@ -25,5 +25,15 @@ module Razorpay
|
|
|
25
25
|
r = self.class.request
|
|
26
26
|
r.request :get, "/orders/#{id}/payments", options
|
|
27
27
|
end
|
|
28
|
+
|
|
29
|
+
def self.edit(id, options = {})
|
|
30
|
+
request.patch id, options
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def self.fetch_transfer_order(id)
|
|
34
|
+
# Fetch Transfer for an Order
|
|
35
|
+
# Docs: https://razorpay.com/docs/api/payments/route/#fetch-transfer-for-an-order
|
|
36
|
+
request.get "#{id}/?expand[]=transfers&status"
|
|
37
|
+
end
|
|
28
38
|
end
|
|
29
39
|
end
|
data/lib/razorpay/payment.rb
CHANGED
|
@@ -10,6 +10,46 @@ module Razorpay
|
|
|
10
10
|
def self.request
|
|
11
11
|
Razorpay::Request.new('payments')
|
|
12
12
|
end
|
|
13
|
+
|
|
14
|
+
def self.create_recurring_payment(data={})
|
|
15
|
+
request.post "create/recurring" , data
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def self.create_json_payment(data={})
|
|
19
|
+
request.post "create/json" , data
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def self.fetch_payment_downtime
|
|
23
|
+
request.get "downtimes"
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def self.fetch_payment_downtime_by_id(id)
|
|
27
|
+
request.get "downtimes/#{id}"
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def self.fetch_card_details(id)
|
|
31
|
+
request.get "#{id}/card"
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def fetch_transfer
|
|
35
|
+
self.class.request.get "#{id}/transfers"
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def fetch_refund(refundId)
|
|
39
|
+
self.class.request.get "#{id}/refunds/#{refundId}"
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def self.fetch_multiple_refund(id, options = {})
|
|
43
|
+
request.get "#{id}/refunds",options
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def transfer(options = {})
|
|
47
|
+
self.class.request.post "#{id}/transfers", options
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def edit(options = {})
|
|
51
|
+
self.class.request.patch id, options
|
|
52
|
+
end
|
|
13
53
|
|
|
14
54
|
def self.fetch(id)
|
|
15
55
|
request.fetch id
|
|
@@ -52,5 +92,17 @@ module Razorpay
|
|
|
52
92
|
def bank_transfer
|
|
53
93
|
self.class.request.get "#{id}/bank_transfer"
|
|
54
94
|
end
|
|
95
|
+
|
|
96
|
+
def self.otp_generate(id)
|
|
97
|
+
request.post "#{id}/otp_generate"
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
def otp_submit(options)
|
|
101
|
+
self.class.request.post "#{id}/otp/submit", options
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
def otp_resend
|
|
105
|
+
self.class.request.post "#{id}/otp/resend"
|
|
106
|
+
end
|
|
55
107
|
end
|
|
56
108
|
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
require 'razorpay/request'
|
|
2
|
+
require 'razorpay/entity'
|
|
3
|
+
|
|
4
|
+
module Razorpay
|
|
5
|
+
# Payment Links are URLs that you can send to your customers
|
|
6
|
+
# through SMS and email to collect payments from them.
|
|
7
|
+
class PaymentLink < Entity
|
|
8
|
+
def self.request
|
|
9
|
+
Razorpay::Request.new('payment_links')
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def self.create(options)
|
|
13
|
+
request.create options
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def self.fetch(id)
|
|
17
|
+
request.fetch id
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def self.edit(id, options = {})
|
|
21
|
+
request.patch id, options
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def self.all(options = {})
|
|
25
|
+
request.all options
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def self.cancel(id)
|
|
29
|
+
request.post "#{id}/cancel"
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def self.notify_by(id,medium)
|
|
33
|
+
request.post "#{id}/notify_by/#{medium}"
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
require 'razorpay/request'
|
|
2
|
+
require 'razorpay/entity'
|
|
3
|
+
|
|
4
|
+
module Razorpay
|
|
5
|
+
# QrCode API allows you to create, close and fetch QR codes
|
|
6
|
+
class QrCode < Entity
|
|
7
|
+
def self.request
|
|
8
|
+
Razorpay::Request.new('payments/qr_codes')
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def self.create(options)
|
|
12
|
+
if(!options.is_a?(String) && options.key?(:fixed_amount))
|
|
13
|
+
options[:fixed_amount] = (options[:fixed_amount] ? 1 : 0)
|
|
14
|
+
end
|
|
15
|
+
request.create options
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def self.fetch(id)
|
|
19
|
+
request.fetch id
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def self.all(options = {})
|
|
23
|
+
request.all options
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def fetch_payments(options = {})
|
|
27
|
+
self.class.request.get "#{id}/payments", options
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def close
|
|
31
|
+
self.class.request.post "#{id}/close"
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
data/lib/razorpay/refund.rb
CHANGED
data/lib/razorpay/request.rb
CHANGED
|
@@ -39,8 +39,12 @@ module Razorpay
|
|
|
39
39
|
request :post, "/#{@entity_name}/#{url}", data
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
-
def get(url)
|
|
43
|
-
request :get, "/#{@entity_name}/#{url}"
|
|
42
|
+
def get(url, data = {})
|
|
43
|
+
request :get, "/#{@entity_name}/#{url}", data
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def delete(url)
|
|
47
|
+
request :delete, "/#{@entity_name}/#{url}"
|
|
44
48
|
end
|
|
45
49
|
|
|
46
50
|
def put(id, data = {})
|
|
@@ -59,14 +63,14 @@ module Razorpay
|
|
|
59
63
|
create_instance raw_request(method, url, data)
|
|
60
64
|
end
|
|
61
65
|
|
|
62
|
-
def raw_request(method, url, data = {})
|
|
66
|
+
def raw_request(method, url, data = {})
|
|
63
67
|
case method
|
|
64
68
|
when :get
|
|
65
69
|
@options[:query] = data
|
|
66
70
|
when :post, :put, :patch
|
|
67
71
|
@options[:body] = data
|
|
68
72
|
end
|
|
69
|
-
|
|
73
|
+
|
|
70
74
|
self.class.send(method, url, @options)
|
|
71
75
|
end
|
|
72
76
|
|
|
@@ -80,9 +84,12 @@ module Razorpay
|
|
|
80
84
|
def create_instance(res)
|
|
81
85
|
response = res.parsed_response
|
|
82
86
|
|
|
87
|
+
if response.is_a?(Array)==true || response.to_s.length == 0
|
|
88
|
+
return response
|
|
89
|
+
end
|
|
90
|
+
|
|
83
91
|
# if there was an error, throw it
|
|
84
|
-
raise_error(response['error'], res.code) if response.nil? || response.key?('error')
|
|
85
|
-
|
|
92
|
+
raise_error(response['error'], res.code) if response.nil? || response.key?('error') && res.code !=200
|
|
86
93
|
# There must be a top level entity
|
|
87
94
|
# This is either one of payment, refund, or collection at present
|
|
88
95
|
begin
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
require 'razorpay/request'
|
|
2
|
+
require 'razorpay/entity'
|
|
3
|
+
|
|
4
|
+
module Razorpay
|
|
5
|
+
# Settlement API allows you to fetch and delete
|
|
6
|
+
# Docs: https://razorpay.com/docs/api/settlements/
|
|
7
|
+
class Settlement < Entity
|
|
8
|
+
def self.request
|
|
9
|
+
Razorpay::Request.new('settlements')
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def self.fetch(id)
|
|
13
|
+
request.fetch id
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def self.reports(options={})
|
|
17
|
+
request.get "recon/combined", options
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def self.all(options = {})
|
|
21
|
+
request.all options
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def self.create(options={})
|
|
25
|
+
if(!options.is_a?(String) && options.key?(:settle_full_balance))
|
|
26
|
+
options[:settle_full_balance] = (options[:settle_full_balance] ? 1 : 0)
|
|
27
|
+
end
|
|
28
|
+
request.post "ondemand", options
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def self.fetch_all_ondemand_settlement(options={})
|
|
32
|
+
request.get "ondemand", options
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def self.fetch_ondemand_settlement_by_id(id, options={})
|
|
36
|
+
request.get "ondemand/#{id}", options
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -32,5 +32,29 @@ module Razorpay
|
|
|
32
32
|
def cancel!(options = {})
|
|
33
33
|
with_a_bang { cancel options }
|
|
34
34
|
end
|
|
35
|
+
|
|
36
|
+
def edit(options = {})
|
|
37
|
+
self.class.request.patch id, options
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def pending_update
|
|
41
|
+
self.class.request.get "#{id}/retrieve_scheduled_changes"
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def self.cancel_scheduled_changes(id)
|
|
45
|
+
request.post "#{id}/cancel_scheduled_changes"
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def self.pause(id, options = {})
|
|
49
|
+
request.post "#{id}/pause", options
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def self.resume(id, options = {})
|
|
53
|
+
request.post "#{id}/resume", options
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def self.delete_offer(id, offerId)
|
|
57
|
+
request.delete "#{id}/#{offerId}"
|
|
58
|
+
end
|
|
35
59
|
end
|
|
36
60
|
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
require 'razorpay/request'
|
|
2
|
+
require 'razorpay/entity'
|
|
3
|
+
|
|
4
|
+
module Razorpay
|
|
5
|
+
# SubscriptionRegistration are an alternate way of
|
|
6
|
+
# creating an authorization transaction
|
|
7
|
+
class SubscriptionRegistration < Entity
|
|
8
|
+
def self.request
|
|
9
|
+
Razorpay::Request.new('subscription_registration/auth_links')
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def self.create(options)
|
|
13
|
+
request.create options
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
require 'razorpay/request'
|
|
2
|
+
require 'razorpay/entity'
|
|
3
|
+
|
|
4
|
+
module Razorpay
|
|
5
|
+
# Transfer class handles all refund objects
|
|
6
|
+
class Transfer < Entity
|
|
7
|
+
def self.request
|
|
8
|
+
Razorpay::Request.new('transfers')
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def self.create(options)
|
|
12
|
+
request.create options
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def self.all(options = {})
|
|
16
|
+
request.all options
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def self.fetch(id)
|
|
20
|
+
request.fetch id
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def edit(options = {})
|
|
24
|
+
self.class.request.patch id, options
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def reverse(options = {})
|
|
28
|
+
self.class.request.post "#{id}/reversals", options
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def self.fetch_settlements
|
|
32
|
+
request.get "?expand[]=recipient_settlement"
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
data/lib/razorpay/utility.rb
CHANGED
|
@@ -10,9 +10,15 @@ module Razorpay
|
|
|
10
10
|
# attributes.sort returns a nested array, and the last
|
|
11
11
|
# element of each is the value. These are joined.
|
|
12
12
|
data = attributes.sort.map(&:last).join('|')
|
|
13
|
-
|
|
14
13
|
secret = Razorpay.auth[:password]
|
|
14
|
+
verify_signature(data, signature, secret)
|
|
15
|
+
end
|
|
15
16
|
|
|
17
|
+
def self.verify_payment_link_signature(attributes)
|
|
18
|
+
signature = attributes.delete(:razorpay_signature)
|
|
19
|
+
# element of each is the value. These are joined.
|
|
20
|
+
data = attributes.values.join('|')
|
|
21
|
+
secret = Razorpay.auth[:password]
|
|
16
22
|
verify_signature(data, signature, secret)
|
|
17
23
|
end
|
|
18
24
|
|
|
@@ -25,7 +31,6 @@ module Razorpay
|
|
|
25
31
|
|
|
26
32
|
def verify_signature(data, signature, secret)
|
|
27
33
|
expected_signature = OpenSSL::HMAC.hexdigest('SHA256', secret, data)
|
|
28
|
-
|
|
29
34
|
verified = secure_compare(expected_signature, signature)
|
|
30
35
|
|
|
31
36
|
raise SecurityError, 'Signature verification failed' unless verified
|
|
@@ -20,13 +20,9 @@ module Razorpay
|
|
|
20
20
|
def self.all(options = {})
|
|
21
21
|
request.all options
|
|
22
22
|
end
|
|
23
|
-
|
|
23
|
+
|
|
24
24
|
def self.close(id)
|
|
25
|
-
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
def close
|
|
29
|
-
self.class.request.patch id, status: 'closed'
|
|
25
|
+
request.post "#{id}/close"
|
|
30
26
|
end
|
|
31
27
|
|
|
32
28
|
def close!
|
|
@@ -37,5 +33,17 @@ module Razorpay
|
|
|
37
33
|
r = self.class.request
|
|
38
34
|
r.request :get, "/virtual_accounts/#{id}/payments", options
|
|
39
35
|
end
|
|
36
|
+
|
|
37
|
+
def self.add_receiver(id, options = {})
|
|
38
|
+
request.post "#{id}/receivers", options
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def self.allowed_payer(id, options = {})
|
|
42
|
+
request.post "#{id}/allowed_payers", options
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def self.delete_allowed_payer(id, payer_id)
|
|
46
|
+
request.delete "#{id}/allowed_payers/#{payer_id}"
|
|
47
|
+
end
|
|
40
48
|
end
|
|
41
49
|
end
|
data/lib/razorpay.rb
CHANGED
|
@@ -12,6 +12,13 @@ require 'razorpay/virtual_account'
|
|
|
12
12
|
require 'razorpay/plan'
|
|
13
13
|
require 'razorpay/subscription'
|
|
14
14
|
require 'razorpay/addon'
|
|
15
|
+
require 'razorpay/transfer'
|
|
16
|
+
require 'razorpay/subscription_registration'
|
|
17
|
+
require 'razorpay/settlement'
|
|
18
|
+
require 'razorpay/payment_link'
|
|
19
|
+
require 'razorpay/fund_account'
|
|
20
|
+
require 'razorpay/item'
|
|
21
|
+
require 'razorpay/qr_code'
|
|
15
22
|
|
|
16
23
|
# Base Razorpay module
|
|
17
24
|
module Razorpay
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"entity":"collection",
|
|
3
|
+
"count":2,
|
|
4
|
+
"items":[
|
|
5
|
+
{
|
|
6
|
+
"id":"ao_00000000000002",
|
|
7
|
+
"entity":"addon",
|
|
8
|
+
"item":{
|
|
9
|
+
"id":"item_00000000000002",
|
|
10
|
+
"active":true,
|
|
11
|
+
"name":"Extra sweet",
|
|
12
|
+
"description":"1 extra sweet of the day with meals",
|
|
13
|
+
"amount":90000,
|
|
14
|
+
"unit_amount":90000,
|
|
15
|
+
"currency":"INR",
|
|
16
|
+
"type":"addon",
|
|
17
|
+
"unit":null,
|
|
18
|
+
"tax_inclusive":false,
|
|
19
|
+
"hsn_code":null,
|
|
20
|
+
"sac_code":null,
|
|
21
|
+
"tax_rate":null,
|
|
22
|
+
"tax_id":null,
|
|
23
|
+
"tax_group_id":null,
|
|
24
|
+
"created_at":1581597318,
|
|
25
|
+
"updated_at":1581597318
|
|
26
|
+
},
|
|
27
|
+
"quantity":1,
|
|
28
|
+
"created_at":1581597318,
|
|
29
|
+
"subscription_id":"sub_00000000000001",
|
|
30
|
+
"invoice_id":"inv_00000000000001"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id":"ao_00000000000001",
|
|
34
|
+
"entity":"addon",
|
|
35
|
+
"item":{
|
|
36
|
+
"id":"item_00000000000001",
|
|
37
|
+
"active":true,
|
|
38
|
+
"name":"Extra appala (papadum)",
|
|
39
|
+
"description":"1 extra oil fried appala with meals",
|
|
40
|
+
"amount":30000,
|
|
41
|
+
"unit_amount":30000,
|
|
42
|
+
"currency":"INR",
|
|
43
|
+
"type":"addon",
|
|
44
|
+
"unit":null,
|
|
45
|
+
"tax_inclusive":false,
|
|
46
|
+
"hsn_code":null,
|
|
47
|
+
"sac_code":null,
|
|
48
|
+
"tax_rate":null,
|
|
49
|
+
"tax_id":null,
|
|
50
|
+
"tax_group_id":null,
|
|
51
|
+
"created_at":1581597318,
|
|
52
|
+
"updated_at":1581597318
|
|
53
|
+
},
|
|
54
|
+
"quantity":2,
|
|
55
|
+
"created_at":1581597318,
|
|
56
|
+
"subscription_id":"sub_00000000000001",
|
|
57
|
+
"invoice_id":null
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"razorpay_payment_id": "pay_FVmAstJWfsD3SO",
|
|
3
|
+
"next": [
|
|
4
|
+
{
|
|
5
|
+
"action": "redirect",
|
|
6
|
+
"url": "https://api.razorpay.com/v1/payments/FVmAtLUe9XZSGM/authorize"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"action": "otp_generate",
|
|
10
|
+
"url": "https://api.razorpay.com/v1/payments/pay_FVmAstJWfsD3SO/otp_generate?track_id=FVmAtLUe9XZSGM&key_id=<YOUR_KEY_ID>"
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"entity": "collection",
|
|
3
|
+
"count": 1,
|
|
4
|
+
"items": [
|
|
5
|
+
{
|
|
6
|
+
"id": "down_F7LroRQAAFuswd",
|
|
7
|
+
"entity": "payment.downtime",
|
|
8
|
+
"method": "card",
|
|
9
|
+
"begin": 1593196031,
|
|
10
|
+
"end": null,
|
|
11
|
+
"status": "started",
|
|
12
|
+
"scheduled": false,
|
|
13
|
+
"severity": "high",
|
|
14
|
+
"instrument": {
|
|
15
|
+
"issuer": "SBIN"
|
|
16
|
+
},
|
|
17
|
+
"created_at": 1593196089,
|
|
18
|
+
"updated_at": 1593196089
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"id": "
|
|
2
|
+
"id": "ao_IrSY3UIqDRx7df",
|
|
3
3
|
"entity": "addon",
|
|
4
4
|
"item": {
|
|
5
|
-
"id": "
|
|
5
|
+
"id": "item_00000000000001",
|
|
6
6
|
"active": true,
|
|
7
7
|
"name": "fake_item_name",
|
|
8
8
|
"description": "fake_item_description",
|
|
@@ -19,6 +19,6 @@
|
|
|
19
19
|
},
|
|
20
20
|
"quantity": 1,
|
|
21
21
|
"created_at": 1511525697,
|
|
22
|
-
"subscription_id": "
|
|
22
|
+
"subscription_id": "sub_00000000000001",
|
|
23
23
|
"invoice_id": null
|
|
24
24
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id":"trf_JDEnyfvGu22ECp",
|
|
3
|
+
"entity":"transfer",
|
|
4
|
+
"transfer_status":"pending",
|
|
5
|
+
"settlement_status":null,
|
|
6
|
+
"source":"acc_CJoeHMNpi0nC7k",
|
|
7
|
+
"recipient":"acc_CPRsN1LkFccllA",
|
|
8
|
+
"amount":100,
|
|
9
|
+
"currency":"INR",
|
|
10
|
+
"amount_reversed":0,
|
|
11
|
+
"notes":[
|
|
12
|
+
|
|
13
|
+
],
|
|
14
|
+
"fees":1,
|
|
15
|
+
"tax":0,
|
|
16
|
+
"on_hold":false,
|
|
17
|
+
"on_hold_until":null,
|
|
18
|
+
"recipient_settlement_id":null,
|
|
19
|
+
"created_at":1580219046,
|
|
20
|
+
"linked_account_notes":[
|
|
21
|
+
|
|
22
|
+
],
|
|
23
|
+
"processed_at":null,
|
|
24
|
+
"errors":{
|
|
25
|
+
"code":null,
|
|
26
|
+
"description":null,
|
|
27
|
+
"field":null,
|
|
28
|
+
"source":null,
|
|
29
|
+
"step":null,
|
|
30
|
+
"reason":null
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "fake_downtime_id",
|
|
3
|
+
"method": "card",
|
|
4
|
+
"begin": 1593196031,
|
|
5
|
+
"end": null,
|
|
6
|
+
"status": "started",
|
|
7
|
+
"scheduled": false,
|
|
8
|
+
"severity": "high",
|
|
9
|
+
"instrument": {
|
|
10
|
+
"issuer": "SBIN"
|
|
11
|
+
},
|
|
12
|
+
"created_at": 1593196089,
|
|
13
|
+
"updated_at": 1593196089
|
|
14
|
+
}
|
|
@@ -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,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
|
+
}
|