conekta 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/CHANGELOG +9 -1
  4. data/Gemfile +1 -0
  5. data/README.md +68 -46
  6. data/lib/conekta.rb +20 -1
  7. data/lib/conekta/address.rb +1 -0
  8. data/lib/conekta/card.rb +17 -3
  9. data/lib/conekta/charge.rb +7 -0
  10. data/lib/conekta/conekta_object.rb +25 -8
  11. data/lib/conekta/customer.rb +55 -4
  12. data/lib/conekta/destination.rb +29 -0
  13. data/lib/conekta/discount_line.rb +32 -0
  14. data/lib/conekta/error.rb +35 -37
  15. data/lib/conekta/error_list.rb +33 -0
  16. data/lib/conekta/event.rb +4 -1
  17. data/lib/conekta/fiscal_entity.rb +37 -0
  18. data/lib/conekta/line_item.rb +30 -0
  19. data/lib/conekta/list.rb +59 -0
  20. data/lib/conekta/log.rb +4 -0
  21. data/lib/conekta/operations/create_member.rb +20 -10
  22. data/lib/conekta/operations/custom_action.rb +1 -1
  23. data/lib/conekta/operations/delete.rb +3 -1
  24. data/lib/conekta/operations/where.rb +11 -2
  25. data/lib/conekta/order.rb +90 -0
  26. data/lib/conekta/payee.rb +4 -0
  27. data/lib/conekta/payment_source.rb +30 -0
  28. data/lib/conekta/payout_method.rb +12 -3
  29. data/lib/conekta/plan.rb +5 -0
  30. data/lib/conekta/refund.rb +2 -0
  31. data/lib/conekta/requestor.rb +14 -4
  32. data/lib/conekta/resource.rb +26 -4
  33. data/lib/conekta/return.rb +25 -0
  34. data/lib/conekta/shipping_contact.rb +32 -0
  35. data/lib/conekta/shipping_line.rb +33 -0
  36. data/lib/conekta/subscription.rb +17 -3
  37. data/lib/conekta/tax_line.rb +30 -0
  38. data/lib/conekta/token.rb +2 -0
  39. data/lib/conekta/util.rb +37 -3
  40. data/lib/conekta/version.rb +1 -1
  41. data/lib/conekta/webhook.rb +2 -0
  42. data/spec/conekta/1.0.0/.DS_Store +0 -0
  43. data/spec/conekta/1.0.0/card_spec.rb +40 -0
  44. data/spec/conekta/{charge_spec.rb → 1.0.0/charge_spec.rb} +1 -0
  45. data/spec/conekta/{customer_spec.rb → 1.0.0/customer_spec.rb} +3 -2
  46. data/spec/conekta/{error_spec.rb → 1.0.0/error_spec.rb} +3 -1
  47. data/spec/conekta/{event_spec.rb → 1.0.0/event_spec.rb} +1 -0
  48. data/spec/conekta/{log_spec.rb → 1.0.0/log_spec.rb} +1 -0
  49. data/spec/conekta/{payout_spec.rb → 1.0.0/payout_spec.rb} +1 -0
  50. data/spec/conekta/{plan_spec.rb → 1.0.0/plan_spec.rb} +1 -0
  51. data/spec/conekta/{token_spec.rb → 1.0.0/token_spec.rb} +1 -0
  52. data/spec/conekta/{webhook_spec.rb → 1.0.0/webhook_spec.rb} +1 -0
  53. data/spec/conekta/2.0.0/customer_spec.rb +49 -0
  54. data/spec/conekta/2.0.0/discount_line_spec.rb +49 -0
  55. data/spec/conekta/2.0.0/error_list_spec.rb +45 -0
  56. data/spec/conekta/2.0.0/fiscal_entity_spec.rb +67 -0
  57. data/spec/conekta/2.0.0/line_item_spec.rb +53 -0
  58. data/spec/conekta/2.0.0/list_spec.rb +29 -0
  59. data/spec/conekta/2.0.0/order_spec.rb +327 -0
  60. data/spec/conekta/{payee_spec.rb → 2.0.0/payee_spec.rb} +1 -1
  61. data/spec/conekta/2.0.0/shipping_contact_spec.rb +60 -0
  62. data/spec/conekta/2.0.0/shipping_line_spec.rb +53 -0
  63. data/spec/conekta/2.0.0/source_spec.rb +31 -0
  64. data/spec/conekta/2.0.0/tax_line_spec.rb +44 -0
  65. data/spec/conekta_spec.rb +6 -0
  66. data/spec/spec_helper.rb +11 -0
  67. data/spec/support/fixtures/orders.json +2394 -0
  68. data/spec/support/shared_context.rb +49 -0
  69. metadata +62 -21
@@ -16,7 +16,7 @@ describe Conekta::Payee do
16
16
  city: 'Cuauhtemoc',
17
17
  state: 'DF',
18
18
  country: 'MX',
19
- zip: '06100'
19
+ postal_code: '06100'
20
20
  }
21
21
  }
22
22
  end
@@ -0,0 +1,60 @@
1
+ require 'spec_helper'
2
+
3
+ describe Conekta::ShippingContact do
4
+ include_context "API 2.0.0"
5
+ include_context "customer"
6
+
7
+ let(:shipping_contacts) do
8
+ [{
9
+ receiver: "John Williams",
10
+ phone: "+5213353319758",
11
+ address: {
12
+ street1: "250 Alexis St",
13
+ city: "Red Deer",
14
+ state: "Alberta",
15
+ country: "CA",
16
+ postal_code: "T4N 0B8",
17
+ }
18
+ },
19
+ {
20
+ receiver: "John Williams",
21
+ phone: "+5213353319758",
22
+ address: {
23
+ street1: "250 Alexis St",
24
+ city: "Red Deer",
25
+ state: "Alberta",
26
+ country: "CA",
27
+ postal_code: "T4N 0B8",
28
+ }
29
+ }]
30
+ end
31
+
32
+ let(:customer) do
33
+ Conekta::Customer.create(customer_data.
34
+ merge(shipping_contacts: shipping_contacts))
35
+ end
36
+
37
+ let(:shipping_contact) { customer.shipping_contacts.first }
38
+
39
+ context "deleting shipping contacts" do
40
+ it "successful shipping contact delete" do
41
+ shipping_contact.delete
42
+
43
+ expect(shipping_contact.deleted).to eq(true)
44
+ end
45
+ end
46
+
47
+ context "updating shipping contacts" do
48
+ it "successful shipping contact update" do
49
+ shipping_contact.update(receiver: "Mario Moreno")
50
+
51
+ expect(shipping_contact.receiver).to eq("Mario Moreno")
52
+ end
53
+
54
+ it "unsuccessful shipping contact update" do
55
+ expect {
56
+ shipping_contact.update(receiver: 123)
57
+ }.to raise_error(Conekta::ErrorList)
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,53 @@
1
+ require 'spec_helper'
2
+
3
+ describe Conekta::ShippingLine do
4
+ include_context "API 2.0.0"
5
+ include_context "order"
6
+
7
+ let(:shipping_lines) do
8
+ [
9
+ {
10
+ description: "Free Shipping",
11
+ amount: 0,
12
+ tracking_number: "TRACK123",
13
+ carrier: "USPS",
14
+ method: "Train",
15
+ },
16
+ {
17
+ description: "Otro Shipping",
18
+ amount: 40,
19
+ tracking_number: "TRACK124",
20
+ carrier: "USPS",
21
+ method: "Train",
22
+ }
23
+ ]
24
+ end
25
+
26
+ let(:order) do
27
+ Conekta::Order.create(order_data.merge(shipping_lines: shipping_lines))
28
+ end
29
+
30
+ let(:shipping_line) { order.shipping_lines.first }
31
+
32
+ context "deleting shipping lines" do
33
+ it "successful shipping line delete" do
34
+ shipping_line.delete
35
+
36
+ expect(shipping_line.deleted).to eq(true)
37
+ end
38
+ end
39
+
40
+ context "updating shipping lines" do
41
+ it "successful shipping line update" do
42
+ shipping_line.update(method: "Air")
43
+
44
+ expect(shipping_line._method).to eq("Air")
45
+ end
46
+
47
+ it "unsuccessful shipping line update" do
48
+ expect {
49
+ shipping_line.update(amount: -1)
50
+ }.to raise_error(Conekta::ErrorList)
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,31 @@
1
+ require 'spec_helper'
2
+
3
+ describe Conekta::PaymentSource do
4
+ include_context "API 2.0.0"
5
+ include_context "customer"
6
+
7
+ let(:customer) { Conekta::Customer.create(customer_data) }
8
+ let(:payment_source) { customer.payment_sources.first }
9
+
10
+ context "deleting payment_sources" do
11
+ it "successful source delete" do
12
+ payment_source.delete
13
+
14
+ expect(payment_source.deleted).to eq(true)
15
+ end
16
+ end
17
+
18
+ context "updating payment_sources" do
19
+ it "successful payment_source update" do
20
+ payment_source.update(exp_month: 12)
21
+
22
+ expect(payment_source.exp_month).to eq("12")
23
+ end
24
+
25
+ it "unsuccessful payment_source update" do
26
+ expect {
27
+ payment_source.update(token_id: "tok_test_visa_4241")
28
+ }.to raise_error(Conekta::ErrorList)
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,44 @@
1
+ require 'spec_helper'
2
+
3
+ describe Conekta::TaxLine do
4
+ include_context "API 2.0.0"
5
+ include_context "order"
6
+
7
+ let(:tax_lines) do
8
+ [
9
+ {
10
+ description: "IVA",
11
+ amount: 600
12
+ },
13
+ {
14
+ description: "ISR",
15
+ amount: 100
16
+ }
17
+ ]
18
+ end
19
+
20
+ let(:order) { Conekta::Order.create(order_data.merge(tax_lines: tax_lines)) }
21
+ let(:tax_line) { order.tax_lines.first }
22
+
23
+ context "deleting tax lines" do
24
+ it "successful tax line delete" do
25
+ tax_line.delete
26
+
27
+ expect(tax_line.deleted).to eq(true)
28
+ end
29
+ end
30
+
31
+ context "updating tax lines" do
32
+ it "successful tax line update" do
33
+ tax_line.update(amount: 50)
34
+
35
+ expect(tax_line.amount).to eq(50)
36
+ end
37
+
38
+ it "unsuccessful tax line update" do
39
+ expect {
40
+ tax_line.update(amount: -1)
41
+ }.to raise_error(Conekta::ErrorList)
42
+ end
43
+ end
44
+ end
data/spec/conekta_spec.rb CHANGED
@@ -19,5 +19,11 @@ describe Conekta do
19
19
 
20
20
  expect(Conekta.locale).to eq("es")
21
21
  end
22
+
23
+ it "sets the plugin initializer style" do
24
+ Conekta.config { |c| c.plugin = "spree" }
25
+
26
+ expect(Conekta.plugin).to eq("spree")
27
+ end
22
28
  end
23
29
  end
data/spec/spec_helper.rb CHANGED
@@ -11,3 +11,14 @@ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
11
11
  RSpec.configure do |config|
12
12
  config.before(:all) { Conekta.api_key = '1tv5yJp3xnVZ7eK67m4h' }
13
13
  end
14
+
15
+ def expect_to_raise_error_list(klass, message, subklass, &block)
16
+ expect { block.call }.to raise_error(Conekta::ErrorList, nil)
17
+ begin
18
+ block.call
19
+ rescue Conekta::ErrorList => exception
20
+ expect(exception.details).to be_instance_of(Array)
21
+ expect(exception.details).not_to be_empty
22
+ expect(exception.details.first).to be_instance_of(subklass)
23
+ end
24
+ end
@@ -0,0 +1,2394 @@
1
+ {
2
+ "next_page_url": "https://api.conekta.io/orders?next=ord_2fth4jbNMQ5Bmkofq",
3
+ "previous_page_url": null,
4
+ "has_more": true,
5
+ "total": 14216,
6
+ "object": "list",
7
+ "data": [
8
+ {
9
+ "livemode": false,
10
+ "amount": 20000,
11
+ "status": "created",
12
+ "customer_id": null,
13
+ "currency": "MXN",
14
+ "capture": true,
15
+ "last_payment_info": {
16
+ "charge_id": "58865636dba34dd852000afe",
17
+ "payment_method": "OxxoPayment",
18
+ "payment_brand": null,
19
+ "status": "pending_payment"
20
+ },
21
+ "customer_info": {
22
+ "email": "hola@hola.com",
23
+ "phone": "+5213353319758",
24
+ "name": "John Constantine",
25
+ "corporate": null,
26
+ "account_age": null,
27
+ "paid_transactions": null,
28
+ "first_paid_at": 0
29
+ },
30
+ "shipping_contact": null,
31
+ "fiscal_entity": null,
32
+ "object": "order",
33
+ "id": "ord_2fth5M3rEuYiegi7R",
34
+ "metadata": {
35
+ "test": "extra info"
36
+ },
37
+ "created_at": 1485198902,
38
+ "updated_at": 1485198903,
39
+ "line_items": {
40
+ "starting_after": null,
41
+ "ending_before": null,
42
+ "object": "list",
43
+ "has_more": false,
44
+ "total": 1,
45
+ "data": [
46
+ {
47
+ "name": "Box of Cohiba S1s",
48
+ "description": "Imported From Mex.",
49
+ "unit_price": 20000,
50
+ "quantity": 1,
51
+ "sku": "cohb_s1",
52
+ "shippable": null,
53
+ "tags": [
54
+ "food",
55
+ "mexican food"
56
+ ],
57
+ "brand": null,
58
+ "type": "physical",
59
+ "object": "line_item",
60
+ "id": "line_item_2fth5M3rEuYiegi7P",
61
+ "parent_id": "ord_2fth5M3rEuYiegi7R",
62
+ "metadata": {}
63
+ }
64
+ ]
65
+ },
66
+ "shipping_lines": {
67
+ "starting_after": null,
68
+ "ending_before": null,
69
+ "object": "list",
70
+ "has_more": false,
71
+ "total": 0,
72
+ "data": []
73
+ },
74
+ "tax_lines": {
75
+ "starting_after": null,
76
+ "ending_before": null,
77
+ "object": "list",
78
+ "has_more": false,
79
+ "total": 0,
80
+ "data": []
81
+ },
82
+ "discount_lines": {
83
+ "starting_after": null,
84
+ "ending_before": null,
85
+ "object": "list",
86
+ "has_more": false,
87
+ "total": 0,
88
+ "data": []
89
+ },
90
+ "charges": {
91
+ "starting_after": null,
92
+ "ending_before": null,
93
+ "object": "list",
94
+ "has_more": false,
95
+ "total": 1,
96
+ "data": [
97
+ {
98
+ "id": "58865636dba34dd852000afe",
99
+ "livemode": false,
100
+ "created_at": 1485198902,
101
+ "currency": "MXN",
102
+ "description": null,
103
+ "reference_id": null,
104
+ "failure_code": null,
105
+ "failure_message": null,
106
+ "monthly_installments": null,
107
+ "device_fingerprint": null,
108
+ "payment_method": {
109
+ "barcode_url": "https://s3.amazonaws.com/cash_payment_barcodes/sandbox_reference.png",
110
+ "service_name": "OxxoPay",
111
+ "object": "cash_payment",
112
+ "type": "oxxo",
113
+ "expires_at": 1485234903,
114
+ "store_name": "OXXO",
115
+ "reference": "93345678901234"
116
+ },
117
+ "object": "charge",
118
+ "status": "pending_payment",
119
+ "amount": 20000,
120
+ "paid_at": null,
121
+ "fee": 812,
122
+ "customer_id": "",
123
+ "order_id": "ord_2fth5M3rEuYiegi7R",
124
+ "refunds": {
125
+ "starting_after": null,
126
+ "ending_before": null,
127
+ "object": "list",
128
+ "has_more": false,
129
+ "total": 0,
130
+ "data": []
131
+ }
132
+ }
133
+ ]
134
+ },
135
+ "returns": {
136
+ "starting_after": null,
137
+ "ending_before": null,
138
+ "object": "list",
139
+ "has_more": false,
140
+ "total": 0,
141
+ "data": []
142
+ }
143
+ },
144
+ {
145
+ "livemode": false,
146
+ "amount": 20000,
147
+ "status": "returned",
148
+ "customer_id": null,
149
+ "currency": "MXN",
150
+ "capture": true,
151
+ "last_payment_info": {
152
+ "charge_id": "5886562ddba34dd35d000aad",
153
+ "payment_method": "CreditCardPayment",
154
+ "payment_brand": "VISA",
155
+ "status": "paid"
156
+ },
157
+ "customer_info": {
158
+ "email": "hola@hola.com",
159
+ "phone": "+5213353319758",
160
+ "name": "John Constantine",
161
+ "corporate": null,
162
+ "account_age": null,
163
+ "paid_transactions": null,
164
+ "first_paid_at": 0
165
+ },
166
+ "shipping_contact": null,
167
+ "fiscal_entity": null,
168
+ "object": "order",
169
+ "id": "ord_2fth5EQUZ7UtB9fQT",
170
+ "metadata": {
171
+ "test": "extra info"
172
+ },
173
+ "created_at": 1485198893,
174
+ "updated_at": 1485198901,
175
+ "line_items": {
176
+ "starting_after": null,
177
+ "ending_before": null,
178
+ "object": "list",
179
+ "has_more": false,
180
+ "total": 1,
181
+ "data": [
182
+ {
183
+ "name": "Box of Cohiba S1s",
184
+ "description": "Imported From Mex.",
185
+ "unit_price": 20000,
186
+ "quantity": 1,
187
+ "sku": "cohb_s1",
188
+ "shippable": null,
189
+ "tags": [
190
+ "food",
191
+ "mexican food"
192
+ ],
193
+ "brand": null,
194
+ "type": "physical",
195
+ "object": "line_item",
196
+ "id": "line_item_2fth5EQUZ7UtB9fQR",
197
+ "parent_id": "ord_2fth5EQUZ7UtB9fQT",
198
+ "metadata": {}
199
+ }
200
+ ]
201
+ },
202
+ "shipping_lines": {
203
+ "starting_after": null,
204
+ "ending_before": null,
205
+ "object": "list",
206
+ "has_more": false,
207
+ "total": 0,
208
+ "data": []
209
+ },
210
+ "tax_lines": {
211
+ "starting_after": null,
212
+ "ending_before": null,
213
+ "object": "list",
214
+ "has_more": false,
215
+ "total": 0,
216
+ "data": []
217
+ },
218
+ "discount_lines": {
219
+ "starting_after": null,
220
+ "ending_before": null,
221
+ "object": "list",
222
+ "has_more": false,
223
+ "total": 0,
224
+ "data": []
225
+ },
226
+ "charges": {
227
+ "starting_after": null,
228
+ "ending_before": null,
229
+ "object": "list",
230
+ "has_more": false,
231
+ "total": 1,
232
+ "data": [
233
+ {
234
+ "id": "5886562ddba34dd35d000aad",
235
+ "livemode": false,
236
+ "created_at": 1485198893,
237
+ "currency": "MXN",
238
+ "description": null,
239
+ "reference_id": null,
240
+ "failure_code": null,
241
+ "failure_message": null,
242
+ "monthly_installments": null,
243
+ "device_fingerprint": "123456789abcdefghijkmnopqrstuv",
244
+ "payment_method": {
245
+ "name": "Jorge Lopez",
246
+ "exp_month": "12",
247
+ "exp_year": "19",
248
+ "auth_code": "810688",
249
+ "object": "card_payment",
250
+ "type": "credit",
251
+ "normalized_device_fingerprint": null,
252
+ "last4": "4242",
253
+ "brand": "visa",
254
+ "issuer": "",
255
+ "account_type": "",
256
+ "country": "US",
257
+ "fraud_score": 29,
258
+ "fraud_indicators": []
259
+ },
260
+ "object": "charge",
261
+ "status": "refunded",
262
+ "amount": 20000,
263
+ "paid_at": 1485198899,
264
+ "fee": 963,
265
+ "customer_id": "",
266
+ "order_id": "ord_2fth5EQUZ7UtB9fQT",
267
+ "refunds": {
268
+ "starting_after": null,
269
+ "ending_before": null,
270
+ "object": "list",
271
+ "has_more": false,
272
+ "total": 1,
273
+ "data": [
274
+ {
275
+ "object": "refund",
276
+ "amount": -20000,
277
+ "auth_code": "810688",
278
+ "id": "58865635edbb6ede090004f7",
279
+ "created_at": 1485198901
280
+ }
281
+ ]
282
+ }
283
+ }
284
+ ]
285
+ },
286
+ "returns": {
287
+ "starting_after": null,
288
+ "ending_before": null,
289
+ "object": "list",
290
+ "has_more": false,
291
+ "total": 1,
292
+ "data": [
293
+ {
294
+ "livemode": false,
295
+ "amount": 20000,
296
+ "currency": "MXN",
297
+ "charge_id": "5886562ddba34dd35d000aad",
298
+ "reason": "Reason return",
299
+ "id": "ord_ret_2fth5KdEjehMzxpTh",
300
+ "object": "return",
301
+ "created_at": 1485198900,
302
+ "parent_id": "ord_2fth5EQUZ7UtB9fQT"
303
+ }
304
+ ]
305
+ }
306
+ },
307
+ {
308
+ "livemode": false,
309
+ "amount": 20000,
310
+ "status": "created",
311
+ "customer_id": null,
312
+ "currency": "MXN",
313
+ "capture": true,
314
+ "last_payment_info": null,
315
+ "customer_info": null,
316
+ "shipping_contact": null,
317
+ "fiscal_entity": {
318
+ "tax_id": "AMGH851205MN1",
319
+ "company_name": "Test SA de CV",
320
+ "phone": "+5213353319758",
321
+ "email": "test@conekta.io",
322
+ "address": {
323
+ "street1": "250 Alexis St",
324
+ "street2": null,
325
+ "street3": null,
326
+ "internal_number": 19,
327
+ "external_number": 10,
328
+ "city": "Red Deer",
329
+ "state": "Alberta",
330
+ "zip": "78216",
331
+ "country": "mx",
332
+ "object": "fiscal_entity_address"
333
+ },
334
+ "id": "fis_ent_2fth5Diga4CBE9Q5g",
335
+ "object": "fiscal_entity",
336
+ "created_at": 1485198892
337
+ },
338
+ "object": "order",
339
+ "id": "ord_2fth5Cys3rdXXRmmH",
340
+ "metadata": {
341
+ "test": "extra info"
342
+ },
343
+ "created_at": 1485198892,
344
+ "updated_at": 1485198892,
345
+ "line_items": {
346
+ "starting_after": null,
347
+ "ending_before": null,
348
+ "object": "list",
349
+ "has_more": false,
350
+ "total": 1,
351
+ "data": [
352
+ {
353
+ "name": "Box of Cohiba S1s",
354
+ "description": "Imported From Mex.",
355
+ "unit_price": 20000,
356
+ "quantity": 1,
357
+ "sku": "cohb_s1",
358
+ "shippable": null,
359
+ "tags": [
360
+ "food",
361
+ "mexican food"
362
+ ],
363
+ "brand": null,
364
+ "type": "physical",
365
+ "object": "line_item",
366
+ "id": "line_item_2fth5Cys3rdXXRmmG",
367
+ "parent_id": "ord_2fth5Cys3rdXXRmmH",
368
+ "metadata": {}
369
+ }
370
+ ]
371
+ },
372
+ "shipping_lines": {
373
+ "starting_after": null,
374
+ "ending_before": null,
375
+ "object": "list",
376
+ "has_more": false,
377
+ "total": 0,
378
+ "data": []
379
+ },
380
+ "tax_lines": {
381
+ "starting_after": null,
382
+ "ending_before": null,
383
+ "object": "list",
384
+ "has_more": false,
385
+ "total": 0,
386
+ "data": []
387
+ },
388
+ "discount_lines": {
389
+ "starting_after": null,
390
+ "ending_before": null,
391
+ "object": "list",
392
+ "has_more": false,
393
+ "total": 0,
394
+ "data": []
395
+ },
396
+ "charges": {
397
+ "starting_after": null,
398
+ "ending_before": null,
399
+ "object": "list",
400
+ "has_more": false,
401
+ "total": 0,
402
+ "data": []
403
+ },
404
+ "returns": {
405
+ "starting_after": null,
406
+ "ending_before": null,
407
+ "object": "list",
408
+ "has_more": false,
409
+ "total": 0,
410
+ "data": []
411
+ }
412
+ },
413
+ {
414
+ "livemode": false,
415
+ "amount": 20000,
416
+ "status": "created",
417
+ "customer_id": null,
418
+ "currency": "MXN",
419
+ "capture": true,
420
+ "last_payment_info": null,
421
+ "customer_info": null,
422
+ "shipping_contact": null,
423
+ "fiscal_entity": null,
424
+ "object": "order",
425
+ "id": "ord_2fth5CF3Xf4syc56p",
426
+ "metadata": {
427
+ "test": "extra info"
428
+ },
429
+ "created_at": 1485198890,
430
+ "updated_at": 1485198890,
431
+ "line_items": {
432
+ "starting_after": null,
433
+ "ending_before": null,
434
+ "object": "list",
435
+ "has_more": false,
436
+ "total": 1,
437
+ "data": [
438
+ {
439
+ "name": "Box of Cohiba S1s",
440
+ "description": "Imported From Mex.",
441
+ "unit_price": 20000,
442
+ "quantity": 1,
443
+ "sku": "cohb_s1",
444
+ "shippable": null,
445
+ "tags": [
446
+ "food",
447
+ "mexican food"
448
+ ],
449
+ "brand": null,
450
+ "type": "physical",
451
+ "object": "line_item",
452
+ "id": "line_item_2fth5CF3Xf4syc56o",
453
+ "parent_id": "ord_2fth5CF3Xf4syc56p",
454
+ "metadata": {}
455
+ }
456
+ ]
457
+ },
458
+ "shipping_lines": {
459
+ "starting_after": null,
460
+ "ending_before": null,
461
+ "object": "list",
462
+ "has_more": false,
463
+ "total": 0,
464
+ "data": []
465
+ },
466
+ "tax_lines": {
467
+ "starting_after": null,
468
+ "ending_before": null,
469
+ "object": "list",
470
+ "has_more": false,
471
+ "total": 0,
472
+ "data": []
473
+ },
474
+ "discount_lines": {
475
+ "starting_after": null,
476
+ "ending_before": null,
477
+ "object": "list",
478
+ "has_more": false,
479
+ "total": 0,
480
+ "data": []
481
+ },
482
+ "charges": {
483
+ "starting_after": null,
484
+ "ending_before": null,
485
+ "object": "list",
486
+ "has_more": false,
487
+ "total": 0,
488
+ "data": []
489
+ },
490
+ "returns": {
491
+ "starting_after": null,
492
+ "ending_before": null,
493
+ "object": "list",
494
+ "has_more": false,
495
+ "total": 0,
496
+ "data": []
497
+ }
498
+ },
499
+ {
500
+ "livemode": false,
501
+ "amount": 20000,
502
+ "status": "created",
503
+ "customer_id": null,
504
+ "currency": "MXN",
505
+ "capture": true,
506
+ "last_payment_info": null,
507
+ "customer_info": null,
508
+ "shipping_contact": null,
509
+ "fiscal_entity": null,
510
+ "object": "order",
511
+ "id": "ord_2fth5BWE1TWEMLQcN",
512
+ "metadata": {
513
+ "test": "extra info"
514
+ },
515
+ "created_at": 1485198889,
516
+ "updated_at": 1485198889,
517
+ "line_items": {
518
+ "starting_after": null,
519
+ "ending_before": null,
520
+ "object": "list",
521
+ "has_more": false,
522
+ "total": 1,
523
+ "data": [
524
+ {
525
+ "name": "Box of Cohiba S1s",
526
+ "description": "Imported From Mex.",
527
+ "unit_price": 20000,
528
+ "quantity": 1,
529
+ "sku": "cohb_s1",
530
+ "shippable": null,
531
+ "tags": [
532
+ "food",
533
+ "mexican food"
534
+ ],
535
+ "brand": null,
536
+ "type": "physical",
537
+ "object": "line_item",
538
+ "id": "line_item_2fth5BWE1TWEMLQcM",
539
+ "parent_id": "ord_2fth5BWE1TWEMLQcN",
540
+ "metadata": {}
541
+ }
542
+ ]
543
+ },
544
+ "shipping_lines": {
545
+ "starting_after": null,
546
+ "ending_before": null,
547
+ "object": "list",
548
+ "has_more": false,
549
+ "total": 1,
550
+ "data": [
551
+ {
552
+ "amount": 0,
553
+ "carrier": "USPS",
554
+ "method": "Train",
555
+ "tracking_number": "TRACK123",
556
+ "object": "shipping_line",
557
+ "id": "ship_lin_2fth5BPx1AMTtJDKt",
558
+ "parent_id": "ord_2fth5BWE1TWEMLQcN",
559
+ "metadata": null
560
+ }
561
+ ]
562
+ },
563
+ "tax_lines": {
564
+ "starting_after": null,
565
+ "ending_before": null,
566
+ "object": "list",
567
+ "has_more": false,
568
+ "total": 0,
569
+ "data": []
570
+ },
571
+ "discount_lines": {
572
+ "starting_after": null,
573
+ "ending_before": null,
574
+ "object": "list",
575
+ "has_more": false,
576
+ "total": 0,
577
+ "data": []
578
+ },
579
+ "charges": {
580
+ "starting_after": null,
581
+ "ending_before": null,
582
+ "object": "list",
583
+ "has_more": false,
584
+ "total": 0,
585
+ "data": []
586
+ },
587
+ "returns": {
588
+ "starting_after": null,
589
+ "ending_before": null,
590
+ "object": "list",
591
+ "has_more": false,
592
+ "total": 0,
593
+ "data": []
594
+ }
595
+ },
596
+ {
597
+ "livemode": false,
598
+ "amount": 20066,
599
+ "status": "created",
600
+ "customer_id": null,
601
+ "currency": "MXN",
602
+ "capture": true,
603
+ "last_payment_info": null,
604
+ "customer_info": null,
605
+ "shipping_contact": null,
606
+ "fiscal_entity": null,
607
+ "object": "order",
608
+ "id": "ord_2fth59yZRv6zGdkks",
609
+ "metadata": {
610
+ "test": "extra info"
611
+ },
612
+ "created_at": 1485198887,
613
+ "updated_at": 1485198888,
614
+ "line_items": {
615
+ "starting_after": null,
616
+ "ending_before": null,
617
+ "object": "list",
618
+ "has_more": false,
619
+ "total": 1,
620
+ "data": [
621
+ {
622
+ "name": "Box of Cohiba S1s",
623
+ "description": "Imported From Mex.",
624
+ "unit_price": 20000,
625
+ "quantity": 1,
626
+ "sku": "cohb_s1",
627
+ "shippable": null,
628
+ "tags": [
629
+ "food",
630
+ "mexican food"
631
+ ],
632
+ "brand": null,
633
+ "type": "physical",
634
+ "object": "line_item",
635
+ "id": "line_item_2fth59yZRv6zGdkkr",
636
+ "parent_id": "ord_2fth59yZRv6zGdkks",
637
+ "metadata": {}
638
+ }
639
+ ]
640
+ },
641
+ "shipping_lines": {
642
+ "starting_after": null,
643
+ "ending_before": null,
644
+ "object": "list",
645
+ "has_more": false,
646
+ "total": 0,
647
+ "data": []
648
+ },
649
+ "tax_lines": {
650
+ "starting_after": null,
651
+ "ending_before": null,
652
+ "object": "list",
653
+ "has_more": false,
654
+ "total": 2,
655
+ "data": [
656
+ {
657
+ "description": "IVA",
658
+ "amount": 60,
659
+ "object": "tax_line",
660
+ "id": "tax_lin_2fth5Af8UxnpG2YqT",
661
+ "parent_id": "ord_2fth59yZRv6zGdkks",
662
+ "metadata": null
663
+ },
664
+ {
665
+ "description": "ISR",
666
+ "amount": 6,
667
+ "object": "tax_line",
668
+ "id": "tax_lin_2fth5AmQVFwaj4k7v",
669
+ "parent_id": "ord_2fth59yZRv6zGdkks",
670
+ "metadata": null
671
+ }
672
+ ]
673
+ },
674
+ "discount_lines": {
675
+ "starting_after": null,
676
+ "ending_before": null,
677
+ "object": "list",
678
+ "has_more": false,
679
+ "total": 0,
680
+ "data": []
681
+ },
682
+ "charges": {
683
+ "starting_after": null,
684
+ "ending_before": null,
685
+ "object": "list",
686
+ "has_more": false,
687
+ "total": 0,
688
+ "data": []
689
+ },
690
+ "returns": {
691
+ "starting_after": null,
692
+ "ending_before": null,
693
+ "object": "list",
694
+ "has_more": false,
695
+ "total": 0,
696
+ "data": []
697
+ }
698
+ },
699
+ {
700
+ "livemode": false,
701
+ "amount": 40000,
702
+ "status": "created",
703
+ "customer_id": null,
704
+ "currency": "MXN",
705
+ "capture": true,
706
+ "last_payment_info": null,
707
+ "customer_info": null,
708
+ "shipping_contact": null,
709
+ "fiscal_entity": null,
710
+ "object": "order",
711
+ "id": "ord_2fth58SfvN6sWdVms",
712
+ "metadata": {
713
+ "test": "extra info"
714
+ },
715
+ "created_at": 1485198886,
716
+ "updated_at": 1485198887,
717
+ "line_items": {
718
+ "starting_after": null,
719
+ "ending_before": null,
720
+ "object": "list",
721
+ "has_more": false,
722
+ "total": 2,
723
+ "data": [
724
+ {
725
+ "name": "Box of Cohiba S1s",
726
+ "description": "Imported From Mex.",
727
+ "unit_price": 20000,
728
+ "quantity": 1,
729
+ "sku": "cohb_s1",
730
+ "shippable": null,
731
+ "tags": [
732
+ "food",
733
+ "mexican food"
734
+ ],
735
+ "brand": null,
736
+ "type": "physical",
737
+ "object": "line_item",
738
+ "id": "line_item_2fth58SfvN6sWdVmr",
739
+ "parent_id": "ord_2fth58SfvN6sWdVms",
740
+ "metadata": {}
741
+ },
742
+ {
743
+ "name": "Box of Cohiba S1s",
744
+ "description": "Imported From Mex.",
745
+ "unit_price": 20000,
746
+ "quantity": 1,
747
+ "sku": null,
748
+ "shippable": null,
749
+ "tags": [
750
+ "food",
751
+ "mexican food"
752
+ ],
753
+ "brand": null,
754
+ "type": "physical",
755
+ "object": "line_item",
756
+ "id": "line_item_2fth59yZRv6zRXgTt",
757
+ "parent_id": "ord_2fth58SfvN6sWdVms",
758
+ "metadata": {}
759
+ }
760
+ ]
761
+ },
762
+ "shipping_lines": {
763
+ "starting_after": null,
764
+ "ending_before": null,
765
+ "object": "list",
766
+ "has_more": false,
767
+ "total": 0,
768
+ "data": []
769
+ },
770
+ "tax_lines": {
771
+ "starting_after": null,
772
+ "ending_before": null,
773
+ "object": "list",
774
+ "has_more": false,
775
+ "total": 0,
776
+ "data": []
777
+ },
778
+ "discount_lines": {
779
+ "starting_after": null,
780
+ "ending_before": null,
781
+ "object": "list",
782
+ "has_more": false,
783
+ "total": 0,
784
+ "data": []
785
+ },
786
+ "charges": {
787
+ "starting_after": null,
788
+ "ending_before": null,
789
+ "object": "list",
790
+ "has_more": false,
791
+ "total": 0,
792
+ "data": []
793
+ },
794
+ "returns": {
795
+ "starting_after": null,
796
+ "ending_before": null,
797
+ "object": "list",
798
+ "has_more": false,
799
+ "total": 0,
800
+ "data": []
801
+ }
802
+ },
803
+ {
804
+ "livemode": false,
805
+ "amount": 20000,
806
+ "status": "created",
807
+ "customer_id": null,
808
+ "currency": "MXN",
809
+ "capture": true,
810
+ "last_payment_info": null,
811
+ "customer_info": null,
812
+ "shipping_contact": null,
813
+ "fiscal_entity": null,
814
+ "object": "order",
815
+ "id": "ord_2fth56EDMmQvWQZtr",
816
+ "metadata": {
817
+ "test": "extra info"
818
+ },
819
+ "created_at": 1485198882,
820
+ "updated_at": 1485198882,
821
+ "line_items": {
822
+ "starting_after": null,
823
+ "ending_before": null,
824
+ "object": "list",
825
+ "has_more": false,
826
+ "total": 1,
827
+ "data": [
828
+ {
829
+ "name": "Box of Cohiba S1s",
830
+ "description": "Imported From Mex.",
831
+ "unit_price": 20000,
832
+ "quantity": 1,
833
+ "sku": "cohb_s1",
834
+ "shippable": null,
835
+ "tags": [
836
+ "food",
837
+ "mexican food"
838
+ ],
839
+ "brand": null,
840
+ "type": "physical",
841
+ "object": "line_item",
842
+ "id": "line_item_2fth56EDMmQvWQZtq",
843
+ "parent_id": "ord_2fth56EDMmQvWQZtr",
844
+ "metadata": {}
845
+ }
846
+ ]
847
+ },
848
+ "shipping_lines": {
849
+ "starting_after": null,
850
+ "ending_before": null,
851
+ "object": "list",
852
+ "has_more": false,
853
+ "total": 0,
854
+ "data": []
855
+ },
856
+ "tax_lines": {
857
+ "starting_after": null,
858
+ "ending_before": null,
859
+ "object": "list",
860
+ "has_more": false,
861
+ "total": 0,
862
+ "data": []
863
+ },
864
+ "discount_lines": {
865
+ "starting_after": null,
866
+ "ending_before": null,
867
+ "object": "list",
868
+ "has_more": false,
869
+ "total": 0,
870
+ "data": []
871
+ },
872
+ "charges": {
873
+ "starting_after": null,
874
+ "ending_before": null,
875
+ "object": "list",
876
+ "has_more": false,
877
+ "total": 0,
878
+ "data": []
879
+ },
880
+ "returns": {
881
+ "starting_after": null,
882
+ "ending_before": null,
883
+ "object": "list",
884
+ "has_more": false,
885
+ "total": 0,
886
+ "data": []
887
+ }
888
+ },
889
+ {
890
+ "livemode": false,
891
+ "amount": 20000,
892
+ "status": "created",
893
+ "customer_id": null,
894
+ "currency": "MXN",
895
+ "capture": true,
896
+ "last_payment_info": null,
897
+ "customer_info": null,
898
+ "shipping_contact": null,
899
+ "fiscal_entity": null,
900
+ "object": "order",
901
+ "id": "ord_2fth54kaKNHdPHBKk",
902
+ "metadata": {
903
+ "test": "extra info"
904
+ },
905
+ "created_at": 1485198880,
906
+ "updated_at": 1485198880,
907
+ "line_items": {
908
+ "starting_after": null,
909
+ "ending_before": null,
910
+ "object": "list",
911
+ "has_more": false,
912
+ "total": 1,
913
+ "data": [
914
+ {
915
+ "name": "Box of Cohiba S1s",
916
+ "description": "Imported From Mex.",
917
+ "unit_price": 20000,
918
+ "quantity": 1,
919
+ "sku": "cohb_s1",
920
+ "shippable": null,
921
+ "tags": [
922
+ "food",
923
+ "mexican food"
924
+ ],
925
+ "brand": null,
926
+ "type": "physical",
927
+ "object": "line_item",
928
+ "id": "line_item_2fth54kaKNHdPHBKj",
929
+ "parent_id": "ord_2fth54kaKNHdPHBKk",
930
+ "metadata": {}
931
+ }
932
+ ]
933
+ },
934
+ "shipping_lines": {
935
+ "starting_after": null,
936
+ "ending_before": null,
937
+ "object": "list",
938
+ "has_more": false,
939
+ "total": 0,
940
+ "data": []
941
+ },
942
+ "tax_lines": {
943
+ "starting_after": null,
944
+ "ending_before": null,
945
+ "object": "list",
946
+ "has_more": false,
947
+ "total": 0,
948
+ "data": []
949
+ },
950
+ "discount_lines": {
951
+ "starting_after": null,
952
+ "ending_before": null,
953
+ "object": "list",
954
+ "has_more": false,
955
+ "total": 0,
956
+ "data": []
957
+ },
958
+ "charges": {
959
+ "starting_after": null,
960
+ "ending_before": null,
961
+ "object": "list",
962
+ "has_more": false,
963
+ "total": 0,
964
+ "data": []
965
+ },
966
+ "returns": {
967
+ "starting_after": null,
968
+ "ending_before": null,
969
+ "object": "list",
970
+ "has_more": false,
971
+ "total": 0,
972
+ "data": []
973
+ }
974
+ },
975
+ {
976
+ "livemode": false,
977
+ "amount": 60000,
978
+ "status": "created",
979
+ "customer_id": null,
980
+ "currency": "USD",
981
+ "capture": true,
982
+ "last_payment_info": null,
983
+ "customer_info": null,
984
+ "shipping_contact": null,
985
+ "fiscal_entity": null,
986
+ "object": "order",
987
+ "id": "ord_2fth5451GKboLvQfW",
988
+ "metadata": {
989
+ "test": "extra info"
990
+ },
991
+ "created_at": 1485198879,
992
+ "updated_at": 1485198880,
993
+ "line_items": {
994
+ "starting_after": null,
995
+ "ending_before": null,
996
+ "object": "list",
997
+ "has_more": false,
998
+ "total": 1,
999
+ "data": [
1000
+ {
1001
+ "name": "Box of chocolates",
1002
+ "description": "Imported From Uruguay.",
1003
+ "unit_price": 30000,
1004
+ "quantity": 2,
1005
+ "sku": "choc_s3",
1006
+ "shippable": null,
1007
+ "tags": [
1008
+ "Chocolate",
1009
+ "Sudamerican chocolates"
1010
+ ],
1011
+ "brand": null,
1012
+ "type": "physical",
1013
+ "object": "line_item",
1014
+ "id": "line_item_2fth54kaKNHdPHBKi",
1015
+ "parent_id": "ord_2fth5451GKboLvQfW",
1016
+ "metadata": {}
1017
+ }
1018
+ ]
1019
+ },
1020
+ "shipping_lines": {
1021
+ "starting_after": null,
1022
+ "ending_before": null,
1023
+ "object": "list",
1024
+ "has_more": false,
1025
+ "total": 0,
1026
+ "data": []
1027
+ },
1028
+ "tax_lines": {
1029
+ "starting_after": null,
1030
+ "ending_before": null,
1031
+ "object": "list",
1032
+ "has_more": false,
1033
+ "total": 0,
1034
+ "data": []
1035
+ },
1036
+ "discount_lines": {
1037
+ "starting_after": null,
1038
+ "ending_before": null,
1039
+ "object": "list",
1040
+ "has_more": false,
1041
+ "total": 0,
1042
+ "data": []
1043
+ },
1044
+ "charges": {
1045
+ "starting_after": null,
1046
+ "ending_before": null,
1047
+ "object": "list",
1048
+ "has_more": false,
1049
+ "total": 0,
1050
+ "data": []
1051
+ },
1052
+ "returns": {
1053
+ "starting_after": null,
1054
+ "ending_before": null,
1055
+ "object": "list",
1056
+ "has_more": false,
1057
+ "total": 0,
1058
+ "data": []
1059
+ }
1060
+ },
1061
+ {
1062
+ "livemode": false,
1063
+ "amount": 20000,
1064
+ "status": "created",
1065
+ "customer_id": null,
1066
+ "currency": "MXN",
1067
+ "capture": true,
1068
+ "last_payment_info": {
1069
+ "charge_id": "5886561ddba34dd852000ad8",
1070
+ "payment_method": "OxxoPayment",
1071
+ "payment_brand": null,
1072
+ "status": "pending_payment"
1073
+ },
1074
+ "customer_info": {
1075
+ "email": "hola@hola.com",
1076
+ "phone": "+5213353319758",
1077
+ "name": "John Constantine",
1078
+ "corporate": null,
1079
+ "account_age": null,
1080
+ "paid_transactions": null,
1081
+ "first_paid_at": 0
1082
+ },
1083
+ "shipping_contact": null,
1084
+ "fiscal_entity": null,
1085
+ "object": "order",
1086
+ "id": "ord_2fth51uaEsBnzUthh",
1087
+ "metadata": {
1088
+ "test": "extra info"
1089
+ },
1090
+ "created_at": 1485198876,
1091
+ "updated_at": 1485198876,
1092
+ "line_items": {
1093
+ "starting_after": null,
1094
+ "ending_before": null,
1095
+ "object": "list",
1096
+ "has_more": false,
1097
+ "total": 1,
1098
+ "data": [
1099
+ {
1100
+ "name": "Box of Cohiba S1s",
1101
+ "description": "Imported From Mex.",
1102
+ "unit_price": 20000,
1103
+ "quantity": 1,
1104
+ "sku": "cohb_s1",
1105
+ "shippable": null,
1106
+ "tags": [
1107
+ "food",
1108
+ "mexican food"
1109
+ ],
1110
+ "brand": null,
1111
+ "type": "physical",
1112
+ "object": "line_item",
1113
+ "id": "line_item_2fth51uaEsBnzUthf",
1114
+ "parent_id": "ord_2fth51uaEsBnzUthh",
1115
+ "metadata": {}
1116
+ }
1117
+ ]
1118
+ },
1119
+ "shipping_lines": {
1120
+ "starting_after": null,
1121
+ "ending_before": null,
1122
+ "object": "list",
1123
+ "has_more": false,
1124
+ "total": 0,
1125
+ "data": []
1126
+ },
1127
+ "tax_lines": {
1128
+ "starting_after": null,
1129
+ "ending_before": null,
1130
+ "object": "list",
1131
+ "has_more": false,
1132
+ "total": 0,
1133
+ "data": []
1134
+ },
1135
+ "discount_lines": {
1136
+ "starting_after": null,
1137
+ "ending_before": null,
1138
+ "object": "list",
1139
+ "has_more": false,
1140
+ "total": 0,
1141
+ "data": []
1142
+ },
1143
+ "charges": {
1144
+ "starting_after": null,
1145
+ "ending_before": null,
1146
+ "object": "list",
1147
+ "has_more": false,
1148
+ "total": 1,
1149
+ "data": [
1150
+ {
1151
+ "id": "5886561ddba34dd852000ad8",
1152
+ "livemode": false,
1153
+ "created_at": 1485198877,
1154
+ "currency": "MXN",
1155
+ "description": null,
1156
+ "reference_id": null,
1157
+ "failure_code": null,
1158
+ "failure_message": null,
1159
+ "monthly_installments": null,
1160
+ "device_fingerprint": null,
1161
+ "payment_method": {
1162
+ "barcode_url": "https://s3.amazonaws.com/cash_payment_barcodes/sandbox_reference.png",
1163
+ "service_name": "OxxoPay",
1164
+ "object": "cash_payment",
1165
+ "type": "oxxo",
1166
+ "expires_at": 1487808000,
1167
+ "store_name": "OXXO",
1168
+ "reference": "93345678901234"
1169
+ },
1170
+ "object": "charge",
1171
+ "status": "pending_payment",
1172
+ "amount": 20000,
1173
+ "paid_at": null,
1174
+ "fee": 812,
1175
+ "customer_id": "",
1176
+ "order_id": "ord_2fth51uaEsBnzUthh",
1177
+ "refunds": {
1178
+ "starting_after": null,
1179
+ "ending_before": null,
1180
+ "object": "list",
1181
+ "has_more": false,
1182
+ "total": 0,
1183
+ "data": []
1184
+ }
1185
+ }
1186
+ ]
1187
+ },
1188
+ "returns": {
1189
+ "starting_after": null,
1190
+ "ending_before": null,
1191
+ "object": "list",
1192
+ "has_more": false,
1193
+ "total": 0,
1194
+ "data": []
1195
+ }
1196
+ },
1197
+ {
1198
+ "livemode": false,
1199
+ "amount": 20000,
1200
+ "status": "fulfilled",
1201
+ "customer_id": null,
1202
+ "currency": "MXN",
1203
+ "capture": true,
1204
+ "last_payment_info": {
1205
+ "charge_id": "5886561bedbb6ede090004cf",
1206
+ "payment_method": "OxxoPayment",
1207
+ "payment_brand": null,
1208
+ "status": "pending_payment"
1209
+ },
1210
+ "customer_info": {
1211
+ "email": "hola@hola.com",
1212
+ "phone": "+5213353319758",
1213
+ "name": "John Constantine",
1214
+ "corporate": null,
1215
+ "account_age": null,
1216
+ "paid_transactions": null,
1217
+ "first_paid_at": 0
1218
+ },
1219
+ "shipping_contact": null,
1220
+ "fiscal_entity": null,
1221
+ "object": "order",
1222
+ "id": "ord_2fth51Akifd9NDEDA",
1223
+ "metadata": {
1224
+ "test": "extra info"
1225
+ },
1226
+ "created_at": 1485198875,
1227
+ "updated_at": 1485198907,
1228
+ "line_items": {
1229
+ "starting_after": null,
1230
+ "ending_before": null,
1231
+ "object": "list",
1232
+ "has_more": false,
1233
+ "total": 1,
1234
+ "data": [
1235
+ {
1236
+ "name": "Box of Cohiba S1s",
1237
+ "description": "Imported From Mex.",
1238
+ "unit_price": 20000,
1239
+ "quantity": 1,
1240
+ "sku": "cohb_s1",
1241
+ "shippable": null,
1242
+ "tags": [
1243
+ "food",
1244
+ "mexican food"
1245
+ ],
1246
+ "brand": null,
1247
+ "type": "physical",
1248
+ "object": "line_item",
1249
+ "id": "line_item_2fth51Akifd9NDED8",
1250
+ "parent_id": "ord_2fth51Akifd9NDEDA",
1251
+ "metadata": {}
1252
+ }
1253
+ ]
1254
+ },
1255
+ "shipping_lines": {
1256
+ "starting_after": null,
1257
+ "ending_before": null,
1258
+ "object": "list",
1259
+ "has_more": false,
1260
+ "total": 0,
1261
+ "data": []
1262
+ },
1263
+ "tax_lines": {
1264
+ "starting_after": null,
1265
+ "ending_before": null,
1266
+ "object": "list",
1267
+ "has_more": false,
1268
+ "total": 0,
1269
+ "data": []
1270
+ },
1271
+ "discount_lines": {
1272
+ "starting_after": null,
1273
+ "ending_before": null,
1274
+ "object": "list",
1275
+ "has_more": false,
1276
+ "total": 0,
1277
+ "data": []
1278
+ },
1279
+ "charges": {
1280
+ "starting_after": null,
1281
+ "ending_before": null,
1282
+ "object": "list",
1283
+ "has_more": false,
1284
+ "total": 1,
1285
+ "data": [
1286
+ {
1287
+ "id": "5886561bedbb6ede090004cf",
1288
+ "livemode": false,
1289
+ "created_at": 1485198875,
1290
+ "currency": "MXN",
1291
+ "description": null,
1292
+ "reference_id": null,
1293
+ "failure_code": null,
1294
+ "failure_message": null,
1295
+ "monthly_installments": null,
1296
+ "device_fingerprint": null,
1297
+ "payment_method": {
1298
+ "barcode_url": "https://s3.amazonaws.com/cash_payment_barcodes/sandbox_reference.png",
1299
+ "service_name": "OxxoPay",
1300
+ "object": "cash_payment",
1301
+ "type": "oxxo",
1302
+ "expires_at": 1485234876,
1303
+ "store_name": "OXXO",
1304
+ "reference": "93345678901234"
1305
+ },
1306
+ "object": "charge",
1307
+ "status": "paid",
1308
+ "amount": 20000,
1309
+ "paid_at": 1485198907,
1310
+ "fee": 812,
1311
+ "customer_id": "",
1312
+ "order_id": "ord_2fth51Akifd9NDEDA",
1313
+ "refunds": {
1314
+ "starting_after": null,
1315
+ "ending_before": null,
1316
+ "object": "list",
1317
+ "has_more": false,
1318
+ "total": 0,
1319
+ "data": []
1320
+ }
1321
+ }
1322
+ ]
1323
+ },
1324
+ "returns": {
1325
+ "starting_after": null,
1326
+ "ending_before": null,
1327
+ "object": "list",
1328
+ "has_more": false,
1329
+ "total": 0,
1330
+ "data": []
1331
+ }
1332
+ },
1333
+ {
1334
+ "livemode": false,
1335
+ "amount": 20000,
1336
+ "status": "created",
1337
+ "customer_id": null,
1338
+ "currency": "MXN",
1339
+ "capture": true,
1340
+ "last_payment_info": null,
1341
+ "customer_info": null,
1342
+ "shipping_contact": null,
1343
+ "fiscal_entity": null,
1344
+ "object": "order",
1345
+ "id": "ord_2fth4yh7gGVrC7s6p",
1346
+ "metadata": {
1347
+ "test": "extra info"
1348
+ },
1349
+ "created_at": 1485198873,
1350
+ "updated_at": 1485198873,
1351
+ "line_items": {
1352
+ "starting_after": null,
1353
+ "ending_before": null,
1354
+ "object": "list",
1355
+ "has_more": false,
1356
+ "total": 1,
1357
+ "data": [
1358
+ {
1359
+ "name": "Box of Cohiba S1s",
1360
+ "description": "Imported From Mex.",
1361
+ "unit_price": 20000,
1362
+ "quantity": 1,
1363
+ "sku": "cohb_s1",
1364
+ "shippable": null,
1365
+ "tags": [
1366
+ "food",
1367
+ "mexican food"
1368
+ ],
1369
+ "brand": null,
1370
+ "type": "physical",
1371
+ "object": "line_item",
1372
+ "id": "line_item_2fth4yh7gGVrC7s6o",
1373
+ "parent_id": "ord_2fth4yh7gGVrC7s6p",
1374
+ "metadata": {}
1375
+ }
1376
+ ]
1377
+ },
1378
+ "shipping_lines": {
1379
+ "starting_after": null,
1380
+ "ending_before": null,
1381
+ "object": "list",
1382
+ "has_more": false,
1383
+ "total": 0,
1384
+ "data": []
1385
+ },
1386
+ "tax_lines": {
1387
+ "starting_after": null,
1388
+ "ending_before": null,
1389
+ "object": "list",
1390
+ "has_more": false,
1391
+ "total": 0,
1392
+ "data": []
1393
+ },
1394
+ "discount_lines": {
1395
+ "starting_after": null,
1396
+ "ending_before": null,
1397
+ "object": "list",
1398
+ "has_more": false,
1399
+ "total": 0,
1400
+ "data": []
1401
+ },
1402
+ "charges": {
1403
+ "starting_after": null,
1404
+ "ending_before": null,
1405
+ "object": "list",
1406
+ "has_more": false,
1407
+ "total": 0,
1408
+ "data": []
1409
+ },
1410
+ "returns": {
1411
+ "starting_after": null,
1412
+ "ending_before": null,
1413
+ "object": "list",
1414
+ "has_more": false,
1415
+ "total": 0,
1416
+ "data": []
1417
+ }
1418
+ },
1419
+ {
1420
+ "livemode": false,
1421
+ "amount": 2000,
1422
+ "status": "fulfilled",
1423
+ "customer_id": null,
1424
+ "currency": "MXN",
1425
+ "capture": true,
1426
+ "last_payment_info": {
1427
+ "charge_id": "588655e8c835f06c7b000a13",
1428
+ "payment_method": "CreditCardPayment",
1429
+ "payment_brand": "VISA",
1430
+ "status": "paid"
1431
+ },
1432
+ "customer_info": {
1433
+ "email": "logan@x-men.org",
1434
+ "phone": "4033420642",
1435
+ "name": "Arnulfo Quimare",
1436
+ "corporate": false,
1437
+ "account_age": null,
1438
+ "paid_transactions": null,
1439
+ "first_paid_at": 0
1440
+ },
1441
+ "shipping_contact": null,
1442
+ "fiscal_entity": null,
1443
+ "object": "order",
1444
+ "id": "ord_2fth4kLBsbdqQ2UBT",
1445
+ "metadata": {},
1446
+ "created_at": 1485198824,
1447
+ "updated_at": 1485198850,
1448
+ "line_items": {
1449
+ "starting_after": null,
1450
+ "ending_before": null,
1451
+ "object": "list",
1452
+ "has_more": false,
1453
+ "total": 1,
1454
+ "data": [
1455
+ {
1456
+ "name": "Box of Cohiba S1s",
1457
+ "description": "Imported From Mex.",
1458
+ "unit_price": 20000,
1459
+ "quantity": 1,
1460
+ "sku": "cohb_s1",
1461
+ "shippable": null,
1462
+ "tags": null,
1463
+ "brand": null,
1464
+ "type": "food",
1465
+ "object": "line_item",
1466
+ "id": "line_item_2fth4MQhACmJEk5UK",
1467
+ "parent_id": "ord_2fth4kLBsbdqQ2UBT",
1468
+ "metadata": {}
1469
+ }
1470
+ ]
1471
+ },
1472
+ "shipping_lines": {
1473
+ "starting_after": null,
1474
+ "ending_before": null,
1475
+ "object": "list",
1476
+ "has_more": false,
1477
+ "total": 0,
1478
+ "data": []
1479
+ },
1480
+ "tax_lines": {
1481
+ "starting_after": null,
1482
+ "ending_before": null,
1483
+ "object": "list",
1484
+ "has_more": false,
1485
+ "total": 0,
1486
+ "data": []
1487
+ },
1488
+ "discount_lines": {
1489
+ "starting_after": null,
1490
+ "ending_before": null,
1491
+ "object": "list",
1492
+ "has_more": false,
1493
+ "total": 0,
1494
+ "data": []
1495
+ },
1496
+ "charges": {
1497
+ "starting_after": null,
1498
+ "ending_before": null,
1499
+ "object": "list",
1500
+ "has_more": false,
1501
+ "total": 1,
1502
+ "data": [
1503
+ {
1504
+ "id": "588655e8c835f06c7b000a13",
1505
+ "livemode": false,
1506
+ "created_at": 1485198824,
1507
+ "currency": "MXN",
1508
+ "description": null,
1509
+ "reference_id": null,
1510
+ "failure_code": null,
1511
+ "failure_message": null,
1512
+ "monthly_installments": null,
1513
+ "device_fingerprint": "123456789abcdefghijkmnopqrstuv",
1514
+ "payment_method": {
1515
+ "name": "Jorge Lopez",
1516
+ "exp_month": "12",
1517
+ "exp_year": "19",
1518
+ "auth_code": "049748",
1519
+ "object": "card_payment",
1520
+ "type": "credit",
1521
+ "normalized_device_fingerprint": null,
1522
+ "last4": "4242",
1523
+ "brand": "visa",
1524
+ "issuer": "",
1525
+ "account_type": "",
1526
+ "country": "US",
1527
+ "fraud_score": 29,
1528
+ "fraud_indicators": []
1529
+ },
1530
+ "object": "charge",
1531
+ "status": "paid",
1532
+ "amount": 2000,
1533
+ "paid_at": 1485198831,
1534
+ "fee": 357,
1535
+ "customer_id": "",
1536
+ "order_id": "ord_2fth4kLBsbdqQ2UBT",
1537
+ "refunds": {
1538
+ "starting_after": null,
1539
+ "ending_before": null,
1540
+ "object": "list",
1541
+ "has_more": false,
1542
+ "total": 0,
1543
+ "data": []
1544
+ }
1545
+ }
1546
+ ]
1547
+ },
1548
+ "returns": {
1549
+ "starting_after": null,
1550
+ "ending_before": null,
1551
+ "object": "list",
1552
+ "has_more": false,
1553
+ "total": 0,
1554
+ "data": []
1555
+ }
1556
+ },
1557
+ {
1558
+ "livemode": false,
1559
+ "amount": 2000,
1560
+ "status": "fulfilled",
1561
+ "customer_id": null,
1562
+ "currency": "MXN",
1563
+ "capture": true,
1564
+ "last_payment_info": {
1565
+ "charge_id": "588655d5dba34dd35d000a5d",
1566
+ "payment_method": "OxxoPayment",
1567
+ "payment_brand": null,
1568
+ "status": "paid"
1569
+ },
1570
+ "customer_info": {
1571
+ "email": "logan@x-men.org",
1572
+ "phone": "403-342-0642",
1573
+ "name": "Arnulfo Quimare",
1574
+ "corporate": false,
1575
+ "account_age": null,
1576
+ "paid_transactions": null,
1577
+ "first_paid_at": 0
1578
+ },
1579
+ "shipping_contact": null,
1580
+ "fiscal_entity": null,
1581
+ "object": "order",
1582
+ "id": "ord_2fth4kLBsbdqQ2UBQ",
1583
+ "metadata": {},
1584
+ "created_at": 1485198805,
1585
+ "updated_at": 1485198848,
1586
+ "line_items": {
1587
+ "starting_after": null,
1588
+ "ending_before": null,
1589
+ "object": "list",
1590
+ "has_more": false,
1591
+ "total": 1,
1592
+ "data": [
1593
+ {
1594
+ "name": "Box of Cohiba S1s",
1595
+ "description": "Imported From Mex.",
1596
+ "unit_price": 20000,
1597
+ "quantity": 1,
1598
+ "sku": "cohb_s1",
1599
+ "shippable": null,
1600
+ "tags": null,
1601
+ "brand": null,
1602
+ "type": "food",
1603
+ "object": "line_item",
1604
+ "id": "line_item_2fth47SNjZwo9PGGt",
1605
+ "parent_id": "ord_2fth4kLBsbdqQ2UBQ",
1606
+ "metadata": {}
1607
+ }
1608
+ ]
1609
+ },
1610
+ "shipping_lines": {
1611
+ "starting_after": null,
1612
+ "ending_before": null,
1613
+ "object": "list",
1614
+ "has_more": false,
1615
+ "total": 0,
1616
+ "data": []
1617
+ },
1618
+ "tax_lines": {
1619
+ "starting_after": null,
1620
+ "ending_before": null,
1621
+ "object": "list",
1622
+ "has_more": false,
1623
+ "total": 0,
1624
+ "data": []
1625
+ },
1626
+ "discount_lines": {
1627
+ "starting_after": null,
1628
+ "ending_before": null,
1629
+ "object": "list",
1630
+ "has_more": false,
1631
+ "total": 0,
1632
+ "data": []
1633
+ },
1634
+ "charges": {
1635
+ "starting_after": null,
1636
+ "ending_before": null,
1637
+ "object": "list",
1638
+ "has_more": false,
1639
+ "total": 1,
1640
+ "data": [
1641
+ {
1642
+ "id": "588655d5dba34dd35d000a5d",
1643
+ "livemode": false,
1644
+ "created_at": 1485198805,
1645
+ "currency": "MXN",
1646
+ "description": null,
1647
+ "reference_id": null,
1648
+ "failure_code": null,
1649
+ "failure_message": null,
1650
+ "monthly_installments": null,
1651
+ "device_fingerprint": null,
1652
+ "payment_method": {
1653
+ "barcode_url": "https://s3.amazonaws.com/cash_payment_barcodes/sandbox_reference.png",
1654
+ "service_name": "OxxoPay",
1655
+ "object": "cash_payment",
1656
+ "type": "oxxo",
1657
+ "expires_at": 1487808000,
1658
+ "store_name": "OXXO",
1659
+ "reference": "93345678901234"
1660
+ },
1661
+ "object": "charge",
1662
+ "status": "paid",
1663
+ "amount": 2000,
1664
+ "paid_at": 1485198838,
1665
+ "fee": 81,
1666
+ "customer_id": "",
1667
+ "order_id": "ord_2fth4kLBsbdqQ2UBQ",
1668
+ "refunds": {
1669
+ "starting_after": null,
1670
+ "ending_before": null,
1671
+ "object": "list",
1672
+ "has_more": false,
1673
+ "total": 0,
1674
+ "data": []
1675
+ }
1676
+ }
1677
+ ]
1678
+ },
1679
+ "returns": {
1680
+ "starting_after": null,
1681
+ "ending_before": null,
1682
+ "object": "list",
1683
+ "has_more": false,
1684
+ "total": 0,
1685
+ "data": []
1686
+ }
1687
+ },
1688
+ {
1689
+ "livemode": false,
1690
+ "amount": 2000,
1691
+ "status": "fulfilled",
1692
+ "customer_id": null,
1693
+ "currency": "MXN",
1694
+ "capture": true,
1695
+ "last_payment_info": {
1696
+ "charge_id": "588655cedba34dd852000aa9",
1697
+ "payment_method": "SpeiPayment",
1698
+ "payment_brand": null,
1699
+ "status": "paid"
1700
+ },
1701
+ "customer_info": {
1702
+ "email": "logan@x-men.org",
1703
+ "phone": "403-342-0642",
1704
+ "name": "Arnulfo Quimare",
1705
+ "corporate": false,
1706
+ "account_age": null,
1707
+ "paid_transactions": null,
1708
+ "first_paid_at": 0
1709
+ },
1710
+ "shipping_contact": null,
1711
+ "fiscal_entity": null,
1712
+ "object": "order",
1713
+ "id": "ord_2fth4kLBsbdqQ2UB9",
1714
+ "metadata": {},
1715
+ "created_at": 1485198798,
1716
+ "updated_at": 1485198847,
1717
+ "line_items": {
1718
+ "starting_after": null,
1719
+ "ending_before": null,
1720
+ "object": "list",
1721
+ "has_more": false,
1722
+ "total": 1,
1723
+ "data": [
1724
+ {
1725
+ "name": "Box of Cohiba S1s",
1726
+ "description": "Imported From Mex.",
1727
+ "unit_price": 20000,
1728
+ "quantity": 1,
1729
+ "sku": "cohb_s1",
1730
+ "shippable": null,
1731
+ "tags": null,
1732
+ "brand": null,
1733
+ "type": "food",
1734
+ "object": "line_item",
1735
+ "id": "line_item_2fth42Ge6B1Fcbh9J",
1736
+ "parent_id": "ord_2fth4kLBsbdqQ2UB9",
1737
+ "metadata": {}
1738
+ }
1739
+ ]
1740
+ },
1741
+ "shipping_lines": {
1742
+ "starting_after": null,
1743
+ "ending_before": null,
1744
+ "object": "list",
1745
+ "has_more": false,
1746
+ "total": 0,
1747
+ "data": []
1748
+ },
1749
+ "tax_lines": {
1750
+ "starting_after": null,
1751
+ "ending_before": null,
1752
+ "object": "list",
1753
+ "has_more": false,
1754
+ "total": 0,
1755
+ "data": []
1756
+ },
1757
+ "discount_lines": {
1758
+ "starting_after": null,
1759
+ "ending_before": null,
1760
+ "object": "list",
1761
+ "has_more": false,
1762
+ "total": 0,
1763
+ "data": []
1764
+ },
1765
+ "charges": {
1766
+ "starting_after": null,
1767
+ "ending_before": null,
1768
+ "object": "list",
1769
+ "has_more": false,
1770
+ "total": 1,
1771
+ "data": [
1772
+ {
1773
+ "id": "588655cedba34dd852000aa9",
1774
+ "livemode": false,
1775
+ "created_at": 1485198798,
1776
+ "currency": "MXN",
1777
+ "description": null,
1778
+ "reference_id": null,
1779
+ "failure_code": null,
1780
+ "failure_message": null,
1781
+ "monthly_installments": null,
1782
+ "device_fingerprint": null,
1783
+ "payment_method": {
1784
+ "clabe": "646180111812345678",
1785
+ "bank": "STP",
1786
+ "issuing_account_holder_name": null,
1787
+ "issuing_account_tax_id": null,
1788
+ "issuing_account_bank": null,
1789
+ "issuing_account_number": null,
1790
+ "receiving_account_holder_name": null,
1791
+ "receiving_account_tax_id": null,
1792
+ "receiving_account_number": "646180111812345678",
1793
+ "receiving_account_bank": "STP",
1794
+ "reference_number": null,
1795
+ "description": null,
1796
+ "tracking_code": null,
1797
+ "executed_at": null,
1798
+ "object": "bank_transfer_payment",
1799
+ "type": "spei",
1800
+ "expires_at": 1492974798
1801
+ },
1802
+ "object": "charge",
1803
+ "status": "paid",
1804
+ "amount": 2000,
1805
+ "paid_at": 1485198828,
1806
+ "fee": 928,
1807
+ "customer_id": "",
1808
+ "order_id": "ord_2fth4kLBsbdqQ2UB9",
1809
+ "refunds": {
1810
+ "starting_after": null,
1811
+ "ending_before": null,
1812
+ "object": "list",
1813
+ "has_more": false,
1814
+ "total": 0,
1815
+ "data": []
1816
+ }
1817
+ }
1818
+ ]
1819
+ },
1820
+ "returns": {
1821
+ "starting_after": null,
1822
+ "ending_before": null,
1823
+ "object": "list",
1824
+ "has_more": false,
1825
+ "total": 0,
1826
+ "data": []
1827
+ }
1828
+ },
1829
+ {
1830
+ "livemode": false,
1831
+ "amount": 2000,
1832
+ "status": "fulfilled",
1833
+ "customer_id": null,
1834
+ "currency": "MXN",
1835
+ "capture": true,
1836
+ "last_payment_info": {
1837
+ "charge_id": "588655e1dba34dd35d000a6f",
1838
+ "payment_method": "CreditCardPayment",
1839
+ "payment_brand": "VISA",
1840
+ "status": "paid"
1841
+ },
1842
+ "customer_info": {
1843
+ "email": "logan@x-men.org",
1844
+ "phone": "4033420642",
1845
+ "name": "Arnulfo Quimare",
1846
+ "corporate": false,
1847
+ "account_age": null,
1848
+ "paid_transactions": null,
1849
+ "first_paid_at": 0
1850
+ },
1851
+ "shipping_contact": null,
1852
+ "fiscal_entity": null,
1853
+ "object": "order",
1854
+ "id": "ord_2fth4kLBsbdqQ2UAx",
1855
+ "metadata": {},
1856
+ "created_at": 1485198817,
1857
+ "updated_at": 1485198849,
1858
+ "line_items": {
1859
+ "starting_after": null,
1860
+ "ending_before": null,
1861
+ "object": "list",
1862
+ "has_more": false,
1863
+ "total": 1,
1864
+ "data": [
1865
+ {
1866
+ "name": "Box of Cohiba S1s",
1867
+ "description": "Imported From Mex.",
1868
+ "unit_price": 20000,
1869
+ "quantity": 1,
1870
+ "sku": "cohb_s1",
1871
+ "shippable": null,
1872
+ "tags": null,
1873
+ "brand": null,
1874
+ "type": "food",
1875
+ "object": "line_item",
1876
+ "id": "line_item_2fth4GJCyxhaedEA2",
1877
+ "parent_id": "ord_2fth4kLBsbdqQ2UAx",
1878
+ "metadata": {}
1879
+ }
1880
+ ]
1881
+ },
1882
+ "shipping_lines": {
1883
+ "starting_after": null,
1884
+ "ending_before": null,
1885
+ "object": "list",
1886
+ "has_more": false,
1887
+ "total": 0,
1888
+ "data": []
1889
+ },
1890
+ "tax_lines": {
1891
+ "starting_after": null,
1892
+ "ending_before": null,
1893
+ "object": "list",
1894
+ "has_more": false,
1895
+ "total": 0,
1896
+ "data": []
1897
+ },
1898
+ "discount_lines": {
1899
+ "starting_after": null,
1900
+ "ending_before": null,
1901
+ "object": "list",
1902
+ "has_more": false,
1903
+ "total": 0,
1904
+ "data": []
1905
+ },
1906
+ "charges": {
1907
+ "starting_after": null,
1908
+ "ending_before": null,
1909
+ "object": "list",
1910
+ "has_more": false,
1911
+ "total": 1,
1912
+ "data": [
1913
+ {
1914
+ "id": "588655e1dba34dd35d000a6f",
1915
+ "livemode": false,
1916
+ "created_at": 1485198817,
1917
+ "currency": "MXN",
1918
+ "description": null,
1919
+ "reference_id": null,
1920
+ "failure_code": null,
1921
+ "failure_message": null,
1922
+ "monthly_installments": null,
1923
+ "device_fingerprint": "123456789abcdefghijkmnopqrstuv",
1924
+ "payment_method": {
1925
+ "name": "Jorge Lopez",
1926
+ "exp_month": "12",
1927
+ "exp_year": "19",
1928
+ "auth_code": "324597",
1929
+ "object": "card_payment",
1930
+ "type": "credit",
1931
+ "normalized_device_fingerprint": null,
1932
+ "last4": "4242",
1933
+ "brand": "visa",
1934
+ "issuer": "",
1935
+ "account_type": "",
1936
+ "country": "US",
1937
+ "fraud_score": 29,
1938
+ "fraud_indicators": []
1939
+ },
1940
+ "object": "charge",
1941
+ "status": "paid",
1942
+ "amount": 2000,
1943
+ "paid_at": 1485198823,
1944
+ "fee": 357,
1945
+ "customer_id": "",
1946
+ "order_id": "ord_2fth4kLBsbdqQ2UAx",
1947
+ "refunds": {
1948
+ "starting_after": null,
1949
+ "ending_before": null,
1950
+ "object": "list",
1951
+ "has_more": false,
1952
+ "total": 0,
1953
+ "data": []
1954
+ }
1955
+ }
1956
+ ]
1957
+ },
1958
+ "returns": {
1959
+ "starting_after": null,
1960
+ "ending_before": null,
1961
+ "object": "list",
1962
+ "has_more": false,
1963
+ "total": 0,
1964
+ "data": []
1965
+ }
1966
+ },
1967
+ {
1968
+ "livemode": false,
1969
+ "amount": 2000,
1970
+ "status": "returned",
1971
+ "customer_id": null,
1972
+ "currency": "MXN",
1973
+ "capture": true,
1974
+ "last_payment_info": {
1975
+ "charge_id": "588655d9c835f0fde2000aa1",
1976
+ "payment_method": "CreditCardPayment",
1977
+ "payment_brand": "VISA",
1978
+ "status": "refunded"
1979
+ },
1980
+ "customer_info": {
1981
+ "email": "logan@x-men.org",
1982
+ "phone": "4033420642",
1983
+ "name": "Arnulfo Quimare",
1984
+ "corporate": false,
1985
+ "account_age": null,
1986
+ "paid_transactions": null,
1987
+ "first_paid_at": 0
1988
+ },
1989
+ "shipping_contact": null,
1990
+ "fiscal_entity": null,
1991
+ "object": "order",
1992
+ "id": "ord_2fth4kLBsbdqQ2UAg",
1993
+ "metadata": {},
1994
+ "created_at": 1485198809,
1995
+ "updated_at": 1485198848,
1996
+ "line_items": {
1997
+ "starting_after": null,
1998
+ "ending_before": null,
1999
+ "object": "list",
2000
+ "has_more": false,
2001
+ "total": 1,
2002
+ "data": [
2003
+ {
2004
+ "name": "Box of Cohiba S1s",
2005
+ "description": "Imported From Mex.",
2006
+ "unit_price": 20000,
2007
+ "quantity": 1,
2008
+ "sku": "cohb_s1",
2009
+ "shippable": null,
2010
+ "tags": null,
2011
+ "brand": null,
2012
+ "type": "food",
2013
+ "object": "line_item",
2014
+ "id": "line_item_2fth4ALQMDKZz74XN",
2015
+ "parent_id": "ord_2fth4kLBsbdqQ2UAg",
2016
+ "metadata": {}
2017
+ }
2018
+ ]
2019
+ },
2020
+ "shipping_lines": {
2021
+ "starting_after": null,
2022
+ "ending_before": null,
2023
+ "object": "list",
2024
+ "has_more": false,
2025
+ "total": 0,
2026
+ "data": []
2027
+ },
2028
+ "tax_lines": {
2029
+ "starting_after": null,
2030
+ "ending_before": null,
2031
+ "object": "list",
2032
+ "has_more": false,
2033
+ "total": 0,
2034
+ "data": []
2035
+ },
2036
+ "discount_lines": {
2037
+ "starting_after": null,
2038
+ "ending_before": null,
2039
+ "object": "list",
2040
+ "has_more": false,
2041
+ "total": 0,
2042
+ "data": []
2043
+ },
2044
+ "charges": {
2045
+ "starting_after": null,
2046
+ "ending_before": null,
2047
+ "object": "list",
2048
+ "has_more": false,
2049
+ "total": 1,
2050
+ "data": [
2051
+ {
2052
+ "id": "588655d9c835f0fde2000aa1",
2053
+ "livemode": false,
2054
+ "created_at": 1485198809,
2055
+ "currency": "MXN",
2056
+ "description": null,
2057
+ "reference_id": null,
2058
+ "failure_code": null,
2059
+ "failure_message": null,
2060
+ "monthly_installments": null,
2061
+ "device_fingerprint": "123456789abcdefghijkmnopqrstuv",
2062
+ "payment_method": {
2063
+ "name": "Jorge Lopez",
2064
+ "exp_month": "12",
2065
+ "exp_year": "19",
2066
+ "auth_code": "182788",
2067
+ "object": "card_payment",
2068
+ "type": "credit",
2069
+ "normalized_device_fingerprint": null,
2070
+ "last4": "4242",
2071
+ "brand": "visa",
2072
+ "issuer": "",
2073
+ "account_type": "",
2074
+ "country": "US",
2075
+ "fraud_score": 29,
2076
+ "fraud_indicators": []
2077
+ },
2078
+ "object": "charge",
2079
+ "status": "refunded",
2080
+ "amount": 2000,
2081
+ "paid_at": 1485198815,
2082
+ "fee": 357,
2083
+ "customer_id": "",
2084
+ "order_id": "ord_2fth4kLBsbdqQ2UAg",
2085
+ "refunds": {
2086
+ "starting_after": null,
2087
+ "ending_before": null,
2088
+ "object": "list",
2089
+ "has_more": false,
2090
+ "total": 1,
2091
+ "data": [
2092
+ {
2093
+ "object": "refund",
2094
+ "amount": -2000,
2095
+ "auth_code": "182788",
2096
+ "id": "588655e1c835f0fde2000aaf",
2097
+ "created_at": 1485198817
2098
+ }
2099
+ ]
2100
+ }
2101
+ }
2102
+ ]
2103
+ },
2104
+ "returns": {
2105
+ "starting_after": null,
2106
+ "ending_before": null,
2107
+ "object": "list",
2108
+ "has_more": false,
2109
+ "total": 1,
2110
+ "data": [
2111
+ {
2112
+ "livemode": false,
2113
+ "amount": -2000,
2114
+ "currency": "MXN",
2115
+ "charge_id": "588655d9c835f0fde2000aa1",
2116
+ "reason": "unknown",
2117
+ "id": "ord_ret_2fth4kLBsbdqQ2UAj",
2118
+ "object": "return",
2119
+ "created_at": 1485198855,
2120
+ "parent_id": "ord_2fth4kLBsbdqQ2UAg"
2121
+ }
2122
+ ]
2123
+ }
2124
+ },
2125
+ {
2126
+ "livemode": false,
2127
+ "amount": 2000,
2128
+ "status": "fulfilled",
2129
+ "customer_id": null,
2130
+ "currency": "MXN",
2131
+ "capture": true,
2132
+ "last_payment_info": {
2133
+ "charge_id": "588655cddba34dd35d000a49",
2134
+ "payment_method": "BanortePayment",
2135
+ "payment_brand": null,
2136
+ "status": "paid"
2137
+ },
2138
+ "customer_info": {
2139
+ "email": "logan@x-men.org",
2140
+ "phone": "403-342-0642",
2141
+ "name": "Arnulfo Quimare",
2142
+ "corporate": false,
2143
+ "account_age": null,
2144
+ "paid_transactions": null,
2145
+ "first_paid_at": 0
2146
+ },
2147
+ "shipping_contact": null,
2148
+ "fiscal_entity": null,
2149
+ "object": "order",
2150
+ "id": "ord_2fth4kLBsbdqQ2UAa",
2151
+ "metadata": {},
2152
+ "created_at": 1485198797,
2153
+ "updated_at": 1485198846,
2154
+ "line_items": {
2155
+ "starting_after": null,
2156
+ "ending_before": null,
2157
+ "object": "list",
2158
+ "has_more": false,
2159
+ "total": 1,
2160
+ "data": [
2161
+ {
2162
+ "name": "Box of Cohiba S1s",
2163
+ "description": "Imported From Mex.",
2164
+ "unit_price": 20000,
2165
+ "quantity": 1,
2166
+ "sku": "cohb_s1",
2167
+ "shippable": null,
2168
+ "tags": null,
2169
+ "brand": null,
2170
+ "type": "food",
2171
+ "object": "line_item",
2172
+ "id": "line_item_2fth41XpZySc9DxML",
2173
+ "parent_id": "ord_2fth4kLBsbdqQ2UAa",
2174
+ "metadata": {}
2175
+ }
2176
+ ]
2177
+ },
2178
+ "shipping_lines": {
2179
+ "starting_after": null,
2180
+ "ending_before": null,
2181
+ "object": "list",
2182
+ "has_more": false,
2183
+ "total": 0,
2184
+ "data": []
2185
+ },
2186
+ "tax_lines": {
2187
+ "starting_after": null,
2188
+ "ending_before": null,
2189
+ "object": "list",
2190
+ "has_more": false,
2191
+ "total": 0,
2192
+ "data": []
2193
+ },
2194
+ "discount_lines": {
2195
+ "starting_after": null,
2196
+ "ending_before": null,
2197
+ "object": "list",
2198
+ "has_more": false,
2199
+ "total": 0,
2200
+ "data": []
2201
+ },
2202
+ "charges": {
2203
+ "starting_after": null,
2204
+ "ending_before": null,
2205
+ "object": "list",
2206
+ "has_more": false,
2207
+ "total": 1,
2208
+ "data": [
2209
+ {
2210
+ "id": "588655cddba34dd35d000a49",
2211
+ "livemode": false,
2212
+ "created_at": 1485198797,
2213
+ "currency": "MXN",
2214
+ "description": null,
2215
+ "reference_id": null,
2216
+ "failure_code": null,
2217
+ "failure_message": null,
2218
+ "monthly_installments": null,
2219
+ "device_fingerprint": null,
2220
+ "payment_method": {
2221
+ "service_name": "Conekta",
2222
+ "service_number": "127589",
2223
+ "reference": "123456789012345",
2224
+ "object": "bank_transfer_payment",
2225
+ "type": "banorte",
2226
+ "expires_at": 1492974797
2227
+ },
2228
+ "object": "charge",
2229
+ "status": "paid",
2230
+ "amount": 2000,
2231
+ "paid_at": 1485198828,
2232
+ "fee": 1411,
2233
+ "customer_id": "",
2234
+ "order_id": "ord_2fth4kLBsbdqQ2UAa",
2235
+ "refunds": {
2236
+ "starting_after": null,
2237
+ "ending_before": null,
2238
+ "object": "list",
2239
+ "has_more": false,
2240
+ "total": 0,
2241
+ "data": []
2242
+ }
2243
+ }
2244
+ ]
2245
+ },
2246
+ "returns": {
2247
+ "starting_after": null,
2248
+ "ending_before": null,
2249
+ "object": "list",
2250
+ "has_more": false,
2251
+ "total": 0,
2252
+ "data": []
2253
+ }
2254
+ },
2255
+ {
2256
+ "livemode": false,
2257
+ "amount": 2000,
2258
+ "status": "fulfilled",
2259
+ "customer_id": null,
2260
+ "currency": "MXN",
2261
+ "capture": true,
2262
+ "last_payment_info": {
2263
+ "charge_id": "588655cedba34dd35d000a53",
2264
+ "payment_method": "CreditCardPayment",
2265
+ "payment_brand": "VISA",
2266
+ "status": "paid"
2267
+ },
2268
+ "customer_info": {
2269
+ "email": "logan@x-men.org",
2270
+ "phone": "4033420642",
2271
+ "name": "Arnulfo Quimare",
2272
+ "corporate": false,
2273
+ "account_age": null,
2274
+ "paid_transactions": null,
2275
+ "first_paid_at": 0
2276
+ },
2277
+ "shipping_contact": null,
2278
+ "fiscal_entity": null,
2279
+ "object": "order",
2280
+ "id": "ord_2fth4jbNMQ5Bmkofq",
2281
+ "metadata": {},
2282
+ "created_at": 1485198798,
2283
+ "updated_at": 1485198847,
2284
+ "line_items": {
2285
+ "starting_after": null,
2286
+ "ending_before": null,
2287
+ "object": "list",
2288
+ "has_more": false,
2289
+ "total": 1,
2290
+ "data": [
2291
+ {
2292
+ "name": "Box of Cohiba S1s",
2293
+ "description": "Imported From Mex.",
2294
+ "unit_price": 20000,
2295
+ "quantity": 1,
2296
+ "sku": "cohb_s1",
2297
+ "shippable": null,
2298
+ "tags": null,
2299
+ "brand": null,
2300
+ "type": "food",
2301
+ "object": "line_item",
2302
+ "id": "line_item_2fth42Ge6B1FmVcqs",
2303
+ "parent_id": "ord_2fth4jbNMQ5Bmkofq",
2304
+ "metadata": {}
2305
+ }
2306
+ ]
2307
+ },
2308
+ "shipping_lines": {
2309
+ "starting_after": null,
2310
+ "ending_before": null,
2311
+ "object": "list",
2312
+ "has_more": false,
2313
+ "total": 0,
2314
+ "data": []
2315
+ },
2316
+ "tax_lines": {
2317
+ "starting_after": null,
2318
+ "ending_before": null,
2319
+ "object": "list",
2320
+ "has_more": false,
2321
+ "total": 0,
2322
+ "data": []
2323
+ },
2324
+ "discount_lines": {
2325
+ "starting_after": null,
2326
+ "ending_before": null,
2327
+ "object": "list",
2328
+ "has_more": false,
2329
+ "total": 0,
2330
+ "data": []
2331
+ },
2332
+ "charges": {
2333
+ "starting_after": null,
2334
+ "ending_before": null,
2335
+ "object": "list",
2336
+ "has_more": false,
2337
+ "total": 1,
2338
+ "data": [
2339
+ {
2340
+ "id": "588655cedba34dd35d000a53",
2341
+ "livemode": false,
2342
+ "created_at": 1485198798,
2343
+ "currency": "MXN",
2344
+ "description": null,
2345
+ "reference_id": null,
2346
+ "failure_code": null,
2347
+ "failure_message": null,
2348
+ "monthly_installments": null,
2349
+ "device_fingerprint": "123456789abcdefghijkmnopqrstuv",
2350
+ "payment_method": {
2351
+ "name": "Jorge Lopez",
2352
+ "exp_month": "12",
2353
+ "exp_year": "19",
2354
+ "auth_code": "848452",
2355
+ "object": "card_payment",
2356
+ "type": "credit",
2357
+ "normalized_device_fingerprint": null,
2358
+ "last4": "4242",
2359
+ "brand": "visa",
2360
+ "issuer": "",
2361
+ "account_type": "",
2362
+ "country": "US",
2363
+ "fraud_score": 29,
2364
+ "fraud_indicators": []
2365
+ },
2366
+ "object": "charge",
2367
+ "status": "paid",
2368
+ "amount": 2000,
2369
+ "paid_at": 1485198804,
2370
+ "fee": 357,
2371
+ "customer_id": "",
2372
+ "order_id": "ord_2fth4jbNMQ5Bmkofq",
2373
+ "refunds": {
2374
+ "starting_after": null,
2375
+ "ending_before": null,
2376
+ "object": "list",
2377
+ "has_more": false,
2378
+ "total": 0,
2379
+ "data": []
2380
+ }
2381
+ }
2382
+ ]
2383
+ },
2384
+ "returns": {
2385
+ "starting_after": null,
2386
+ "ending_before": null,
2387
+ "object": "list",
2388
+ "has_more": false,
2389
+ "total": 0,
2390
+ "data": []
2391
+ }
2392
+ }
2393
+ ]
2394
+ }