cloudcommerce 0.0.31 → 0.0.35
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.
- package/CHANGELOG.md +41 -0
- package/action.yml +4 -0
- package/package.json +6 -6
- package/packages/__skeleton/package.json +4 -1
- package/packages/__skeleton/src/{index.js → index.ts} +0 -0
- package/packages/__skeleton/tsconfig.json +3 -0
- package/packages/api/{tests/fetch-polyfill.js → fetch-polyfill.js} +0 -0
- package/packages/api/lib/index.d.ts +2 -112
- package/packages/api/lib/types.d.ts +1 -1
- package/packages/api/package.json +1 -1
- package/packages/api/src/types.ts +4 -0
- package/packages/api/tests/index.test.ts +1 -1
- package/packages/apps/discounts/lib/index.js +4 -0
- package/packages/apps/discounts/lib/index.js.map +1 -0
- package/packages/apps/discounts/package.json +4 -1
- package/packages/apps/discounts/src/index.ts +7 -0
- package/packages/apps/discounts/tsconfig.json +3 -0
- package/packages/cli/lib/index.js +11 -2
- package/packages/cli/package.json +1 -1
- package/packages/cli/src/index.ts +12 -3
- package/packages/firebase/lib/config.d.ts +15 -0
- package/packages/firebase/lib/config.js +3 -0
- package/packages/firebase/lib/config.js.map +1 -1
- package/packages/firebase/lib/defaults.d.ts +4 -0
- package/packages/firebase/lib/env.d.ts +8 -0
- package/packages/firebase/lib/env.js +19 -0
- package/packages/firebase/lib/env.js.map +1 -0
- package/packages/firebase/lib/handlers/check-store-events.d.ts +2 -0
- package/packages/firebase/lib/handlers/check-store-events.js +31 -0
- package/packages/firebase/lib/handlers/check-store-events.js.map +1 -0
- package/packages/firebase/lib/index.d.ts +5 -0
- package/packages/firebase/lib/index.js +7 -15
- package/packages/firebase/lib/index.js.map +1 -1
- package/packages/firebase/lib/types.d.ts +6 -0
- package/packages/firebase/lib/types.js +0 -1
- package/packages/firebase/lib/types.js.map +1 -1
- package/packages/firebase/package.json +4 -1
- package/packages/firebase/src/config.ts +3 -0
- package/packages/firebase/src/env.ts +30 -0
- package/packages/firebase/src/handlers/check-store-events.ts +31 -0
- package/packages/firebase/src/index.ts +7 -21
- package/packages/firebase/src/types.ts +6 -7
- package/packages/firebase/tsconfig.json +4 -1
- package/packages/modules/CHANGELOG.md +1 -0
- package/packages/modules/README.md +1 -0
- package/packages/modules/lib/firebase/index.js +16 -0
- package/packages/modules/lib/firebase/index.js.map +1 -0
- package/packages/modules/lib/index.js +21 -0
- package/packages/modules/lib/index.js.map +1 -0
- package/packages/modules/package.json +33 -0
- package/packages/modules/schemas/@checkout.cjs +1015 -0
- package/packages/modules/schemas/apply_discount.cjs +324 -0
- package/packages/modules/schemas/calculate_shipping.cjs +666 -0
- package/packages/modules/schemas/create_transaction.cjs +1001 -0
- package/packages/modules/schemas/list_payments.cjs +852 -0
- package/packages/modules/scripts/build-types.sh +33 -0
- package/packages/modules/src/firebase/index.ts +16 -0
- package/packages/modules/src/index.ts +21 -0
- package/packages/modules/tsconfig.json +3 -0
- package/packages/storefront/package.json +2 -2
- package/packages/types/CHANGELOG.md +1 -0
- package/packages/types/README.md +1 -0
- package/packages/types/index.ts +66 -0
- package/packages/types/modules/@checkout:params.d.ts +920 -0
- package/packages/types/modules/apply_discount:params.d.ts +154 -0
- package/packages/types/modules/apply_discount:response.d.ts +71 -0
- package/packages/types/modules/calculate_shipping:params.d.ts +275 -0
- package/packages/types/modules/calculate_shipping:response.d.ts +402 -0
- package/packages/types/modules/create_transaction:params.d.ts +515 -0
- package/packages/types/modules/create_transaction:response.d.ts +261 -0
- package/packages/types/modules/list_payments:params.d.ts +323 -0
- package/packages/types/modules/list_payments:response.d.ts +266 -0
- package/packages/types/package.json +21 -0
- package/pnpm-lock.yaml +505 -274
- package/packages/firebase/lib/methods/check-store-events.js +0 -18
- package/packages/firebase/lib/methods/check-store-events.js.map +0 -1
- package/packages/firebase/src/methods/check-store-events.ts +0 -18
|
@@ -0,0 +1,1001 @@
|
|
|
1
|
+
/* eslint-disable quote-props, comma-dangle, array-bracket-spacing */
|
|
2
|
+
|
|
3
|
+
const schema = {
|
|
4
|
+
'description': 'Triggered when order is being closed, must create payment transaction and return info',
|
|
5
|
+
'type': 'object',
|
|
6
|
+
'required': [ 'items', 'amount', 'buyer', 'payment_method', 'order_number' ],
|
|
7
|
+
'additionalProperties': false,
|
|
8
|
+
'definitions': {
|
|
9
|
+
'address': {
|
|
10
|
+
'type': 'object',
|
|
11
|
+
'additionalProperties': false,
|
|
12
|
+
'required': [ 'zip' ],
|
|
13
|
+
'properties': {
|
|
14
|
+
'zip': {
|
|
15
|
+
'type': 'string',
|
|
16
|
+
'maxLength': 30,
|
|
17
|
+
'description': 'ZIP (CEP, postal...) code'
|
|
18
|
+
},
|
|
19
|
+
'street': {
|
|
20
|
+
'type': 'string',
|
|
21
|
+
'maxLength': 200,
|
|
22
|
+
'description': 'Street or public place name'
|
|
23
|
+
},
|
|
24
|
+
'number': {
|
|
25
|
+
'type': 'integer',
|
|
26
|
+
'min': 1,
|
|
27
|
+
'max': 9999999,
|
|
28
|
+
'description': 'House or building street number'
|
|
29
|
+
},
|
|
30
|
+
'complement': {
|
|
31
|
+
'type': 'string',
|
|
32
|
+
'maxLength': 100,
|
|
33
|
+
'description': 'Address complement or second line, such as apartment number'
|
|
34
|
+
},
|
|
35
|
+
'borough': {
|
|
36
|
+
'type': 'string',
|
|
37
|
+
'maxLength': 100,
|
|
38
|
+
'description': 'Borough name'
|
|
39
|
+
},
|
|
40
|
+
'near_to': {
|
|
41
|
+
'type': 'string',
|
|
42
|
+
'maxLength': 100,
|
|
43
|
+
'description': 'Some optional other reference for this address'
|
|
44
|
+
},
|
|
45
|
+
'line_address': {
|
|
46
|
+
'type': 'string',
|
|
47
|
+
'maxLength': 255,
|
|
48
|
+
'description': 'Full in line mailing address, should include street, number and borough'
|
|
49
|
+
},
|
|
50
|
+
'city': {
|
|
51
|
+
'type': 'string',
|
|
52
|
+
'maxLength': 100,
|
|
53
|
+
'description': 'City name'
|
|
54
|
+
},
|
|
55
|
+
'country': {
|
|
56
|
+
'type': 'string',
|
|
57
|
+
'maxLength': 50,
|
|
58
|
+
'description': 'Country name'
|
|
59
|
+
},
|
|
60
|
+
'country_code': {
|
|
61
|
+
'type': 'string',
|
|
62
|
+
'minLength': 2,
|
|
63
|
+
'maxLength': 2,
|
|
64
|
+
'pattern': '^[A-Z]+$',
|
|
65
|
+
'description': 'An ISO 3166-2 country code'
|
|
66
|
+
},
|
|
67
|
+
'province': {
|
|
68
|
+
'type': 'string',
|
|
69
|
+
'maxLength': 100,
|
|
70
|
+
'description': 'Province or state name'
|
|
71
|
+
},
|
|
72
|
+
'province_code': {
|
|
73
|
+
'type': 'string',
|
|
74
|
+
'minLength': 2,
|
|
75
|
+
'maxLength': 2,
|
|
76
|
+
'pattern': '^[A-Z]+$',
|
|
77
|
+
'description': 'The two-letter code for the province or state'
|
|
78
|
+
},
|
|
79
|
+
'name': {
|
|
80
|
+
'type': 'string',
|
|
81
|
+
'maxLength': 70,
|
|
82
|
+
'description': 'The name of recipient, generally is the customer\'s name'
|
|
83
|
+
},
|
|
84
|
+
'last_name': {
|
|
85
|
+
'type': 'string',
|
|
86
|
+
'maxLength': 70,
|
|
87
|
+
'description': 'The recipient\'s last name'
|
|
88
|
+
},
|
|
89
|
+
'phone': {
|
|
90
|
+
'type': 'object',
|
|
91
|
+
'additionalProperties': false,
|
|
92
|
+
'required': [ 'number' ],
|
|
93
|
+
'properties': {
|
|
94
|
+
'country_code': {
|
|
95
|
+
'type': 'integer',
|
|
96
|
+
'min': 1,
|
|
97
|
+
'max': 999,
|
|
98
|
+
'description': 'Country calling code (without +), defined by standards E.123 and E.164'
|
|
99
|
+
},
|
|
100
|
+
'number': {
|
|
101
|
+
'type': 'string',
|
|
102
|
+
'maxLength': 19,
|
|
103
|
+
'pattern': '^[0-9]+$',
|
|
104
|
+
'description': 'The actual phone number, digits only'
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
'description': 'Customer phone number for this mailing address'
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
'description': 'Address object'
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
'properties': {
|
|
114
|
+
'items': {
|
|
115
|
+
'type': 'array',
|
|
116
|
+
'maxItems': 3000,
|
|
117
|
+
'items': {
|
|
118
|
+
'type': 'object',
|
|
119
|
+
'additionalProperties': false,
|
|
120
|
+
'required': [ 'product_id', 'quantity', 'price' ],
|
|
121
|
+
'properties': {
|
|
122
|
+
'product_id': {
|
|
123
|
+
'type': 'string',
|
|
124
|
+
'pattern': '^[a-f0-9]{24}$',
|
|
125
|
+
'description': 'Product ID'
|
|
126
|
+
},
|
|
127
|
+
'variation_id': {
|
|
128
|
+
'type': 'string',
|
|
129
|
+
'pattern': '^[a-f0-9]{24}$',
|
|
130
|
+
'description': 'ID to specify the variation added to cart, if product has variations'
|
|
131
|
+
},
|
|
132
|
+
'sku': {
|
|
133
|
+
'type': 'string',
|
|
134
|
+
'minLength': 2,
|
|
135
|
+
'maxLength': 100,
|
|
136
|
+
'pattern': '^[A-Za-z0-9-_.]+$',
|
|
137
|
+
'description': 'Product or variation unique reference code'
|
|
138
|
+
},
|
|
139
|
+
'name': {
|
|
140
|
+
'type': 'string',
|
|
141
|
+
'maxLength': 255,
|
|
142
|
+
'description': 'Product or variation full name, or other label for this cart item'
|
|
143
|
+
},
|
|
144
|
+
'quantity': {
|
|
145
|
+
'type': 'number',
|
|
146
|
+
// 'multipleOf': 0.0001,
|
|
147
|
+
'minimum': 0,
|
|
148
|
+
'maximum': 9999999,
|
|
149
|
+
'description': 'Item quantity in cart'
|
|
150
|
+
},
|
|
151
|
+
'currency_id': {
|
|
152
|
+
'type': 'string',
|
|
153
|
+
'pattern': '^[A-Z]{3}$',
|
|
154
|
+
'default': 'BRL',
|
|
155
|
+
'description': 'Designator of currency according to ISO 4217 (3 uppercase letters)'
|
|
156
|
+
},
|
|
157
|
+
'currency_symbol': {
|
|
158
|
+
'type': 'string',
|
|
159
|
+
'maxLength': 20,
|
|
160
|
+
'default': 'R$',
|
|
161
|
+
'description': 'Graphic symbol used as a shorthand for currency\'s name'
|
|
162
|
+
},
|
|
163
|
+
'price': {
|
|
164
|
+
'type': 'number',
|
|
165
|
+
// 'multipleOf': 0.00001,
|
|
166
|
+
'minimum': 0,
|
|
167
|
+
'maximum': 999999999,
|
|
168
|
+
'description': 'Product sale price specifically for this cart'
|
|
169
|
+
},
|
|
170
|
+
'final_price': {
|
|
171
|
+
'type': 'number',
|
|
172
|
+
// 'multipleOf': 0.00001,
|
|
173
|
+
'minimum': 0,
|
|
174
|
+
'maximum': 999999999,
|
|
175
|
+
'description': 'Final item price including additions due to customizations and gift wrap'
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
'description': 'One of the cart items'
|
|
179
|
+
},
|
|
180
|
+
'description': 'Products composing the cart'
|
|
181
|
+
},
|
|
182
|
+
'currency_id': {
|
|
183
|
+
'type': 'string',
|
|
184
|
+
'pattern': '^[A-Z]{3}$',
|
|
185
|
+
'default': 'BRL',
|
|
186
|
+
'description': 'Designator of currency according to ISO 4217 (3 uppercase letters)'
|
|
187
|
+
},
|
|
188
|
+
'currency_symbol': {
|
|
189
|
+
'type': 'string',
|
|
190
|
+
'maxLength': 20,
|
|
191
|
+
'default': 'R$',
|
|
192
|
+
'description': 'Graphic symbol used as a shorthand for currency\'s name'
|
|
193
|
+
},
|
|
194
|
+
'amount': {
|
|
195
|
+
'type': 'object',
|
|
196
|
+
'additionalProperties': false,
|
|
197
|
+
'required': [ 'total' ],
|
|
198
|
+
'properties': {
|
|
199
|
+
'total': {
|
|
200
|
+
'type': 'number',
|
|
201
|
+
// 'multipleOf': 0.00001,
|
|
202
|
+
'minimum': 0,
|
|
203
|
+
'maximum': 9999999999,
|
|
204
|
+
'description': 'Order total amount'
|
|
205
|
+
},
|
|
206
|
+
'subtotal': {
|
|
207
|
+
'type': 'number',
|
|
208
|
+
// 'multipleOf': 0.00001,
|
|
209
|
+
'minimum': 0,
|
|
210
|
+
'maximum': 9999999999,
|
|
211
|
+
'description': 'The sum of all items prices'
|
|
212
|
+
},
|
|
213
|
+
'freight': {
|
|
214
|
+
'type': 'number',
|
|
215
|
+
// 'multipleOf': 0.00001,
|
|
216
|
+
'minimum': 0,
|
|
217
|
+
'maximum': 9999999999,
|
|
218
|
+
'description': 'Order freight cost'
|
|
219
|
+
},
|
|
220
|
+
'discount': {
|
|
221
|
+
'type': 'number',
|
|
222
|
+
// 'multipleOf': 0.00001,
|
|
223
|
+
'minimum': 0,
|
|
224
|
+
'maximum': 9999999999,
|
|
225
|
+
'description': 'Applied discount value'
|
|
226
|
+
},
|
|
227
|
+
'tax': {
|
|
228
|
+
'type': 'number',
|
|
229
|
+
// 'multipleOf': 0.00001,
|
|
230
|
+
'minimum': 0,
|
|
231
|
+
'maximum': 9999999999,
|
|
232
|
+
'description': 'The sum of all the taxes applied to the order'
|
|
233
|
+
},
|
|
234
|
+
'extra': {
|
|
235
|
+
'type': 'number',
|
|
236
|
+
// 'multipleOf': 0.00001,
|
|
237
|
+
'minimum': 0,
|
|
238
|
+
'maximum': 9999999999,
|
|
239
|
+
'description': 'Sum of optional extra costs applied'
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
'description': 'Object with sums of values'
|
|
243
|
+
},
|
|
244
|
+
'type': {
|
|
245
|
+
'type': 'string',
|
|
246
|
+
'enum': [ 'payment', 'recurrence' ],
|
|
247
|
+
'default': 'payment',
|
|
248
|
+
'description': 'Transaction type'
|
|
249
|
+
},
|
|
250
|
+
'payment_method': {
|
|
251
|
+
'type': 'object',
|
|
252
|
+
'required': [ 'code' ],
|
|
253
|
+
'additionalProperties': false,
|
|
254
|
+
'properties': {
|
|
255
|
+
'code': {
|
|
256
|
+
'type': 'string',
|
|
257
|
+
'enum': [
|
|
258
|
+
'credit_card',
|
|
259
|
+
'banking_billet',
|
|
260
|
+
'online_debit',
|
|
261
|
+
'account_deposit',
|
|
262
|
+
'debit_card',
|
|
263
|
+
'balance_on_intermediary',
|
|
264
|
+
'loyalty_points',
|
|
265
|
+
'other'
|
|
266
|
+
],
|
|
267
|
+
'description': 'Standardized payment method code'
|
|
268
|
+
},
|
|
269
|
+
'name': {
|
|
270
|
+
'type': 'string',
|
|
271
|
+
'maxLength': 200,
|
|
272
|
+
'description': 'Short description for payment method'
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
'description': 'Chosen payment method object'
|
|
276
|
+
},
|
|
277
|
+
'buyer': {
|
|
278
|
+
'type': 'object',
|
|
279
|
+
'additionalProperties': false,
|
|
280
|
+
'required': [ 'customer_id', 'email', 'fullname', 'birth_date', 'phone', 'registry_type', 'doc_number' ],
|
|
281
|
+
'properties': {
|
|
282
|
+
'customer_id': {
|
|
283
|
+
'type': 'string',
|
|
284
|
+
'pattern': '^[a-f0-9]{24}$',
|
|
285
|
+
'description': 'Customer ID in the store'
|
|
286
|
+
},
|
|
287
|
+
'email': {
|
|
288
|
+
'type': 'string',
|
|
289
|
+
'maxLength': 200,
|
|
290
|
+
'format': 'email',
|
|
291
|
+
'description': 'Buyer email address'
|
|
292
|
+
},
|
|
293
|
+
'fullname': {
|
|
294
|
+
'type': 'string',
|
|
295
|
+
'maxLength': 255,
|
|
296
|
+
'description': 'Customer full name or company corporate name'
|
|
297
|
+
},
|
|
298
|
+
'gender': {
|
|
299
|
+
'type': 'string',
|
|
300
|
+
'enum': [ 'f', 'm', 'x' ],
|
|
301
|
+
'description': 'Customer gender, female, male or third gender (X)'
|
|
302
|
+
},
|
|
303
|
+
'birth_date': {
|
|
304
|
+
'type': 'object',
|
|
305
|
+
'additionalProperties': false,
|
|
306
|
+
'properties': {
|
|
307
|
+
'day': {
|
|
308
|
+
'type': 'integer',
|
|
309
|
+
'min': 1,
|
|
310
|
+
'max': 31,
|
|
311
|
+
'description': 'Day of birth'
|
|
312
|
+
},
|
|
313
|
+
'month': {
|
|
314
|
+
'type': 'integer',
|
|
315
|
+
'min': 1,
|
|
316
|
+
'max': 12,
|
|
317
|
+
'description': 'Number of month of birth'
|
|
318
|
+
},
|
|
319
|
+
'year': {
|
|
320
|
+
'type': 'integer',
|
|
321
|
+
'min': 1800,
|
|
322
|
+
'max': 2200,
|
|
323
|
+
'description': 'Year of birth'
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
'description': 'Date of customer birth'
|
|
327
|
+
},
|
|
328
|
+
'phone': {
|
|
329
|
+
'type': 'object',
|
|
330
|
+
'additionalProperties': false,
|
|
331
|
+
'required': [ 'number' ],
|
|
332
|
+
'properties': {
|
|
333
|
+
'country_code': {
|
|
334
|
+
'type': 'integer',
|
|
335
|
+
'min': 1,
|
|
336
|
+
'max': 999,
|
|
337
|
+
'description': 'Country calling code (without +), defined by standards E.123 and E.164'
|
|
338
|
+
},
|
|
339
|
+
'number': {
|
|
340
|
+
'type': 'string',
|
|
341
|
+
'maxLength': 19,
|
|
342
|
+
'pattern': '^[0-9]+$',
|
|
343
|
+
'description': 'The actual phone number, digits only'
|
|
344
|
+
},
|
|
345
|
+
'type': {
|
|
346
|
+
'type': 'string',
|
|
347
|
+
'enum': [ 'home', 'personal', 'work', 'other' ],
|
|
348
|
+
'description': 'The type of phone'
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
'description': 'Buyer contact phone'
|
|
352
|
+
},
|
|
353
|
+
'registry_type': {
|
|
354
|
+
'type': 'string',
|
|
355
|
+
'enum': [ 'p', 'j' ],
|
|
356
|
+
'description': 'Physical or juridical (company) person'
|
|
357
|
+
},
|
|
358
|
+
'doc_country': {
|
|
359
|
+
'type': 'string',
|
|
360
|
+
'minLength': 2,
|
|
361
|
+
'maxLength': 2,
|
|
362
|
+
'pattern': '^[A-Z]+$',
|
|
363
|
+
'description': 'Country of document origin, an ISO 3166-2 code'
|
|
364
|
+
},
|
|
365
|
+
'doc_number': {
|
|
366
|
+
'type': 'string',
|
|
367
|
+
'maxLength': 19,
|
|
368
|
+
'pattern': '^[0-9]+$',
|
|
369
|
+
'description': 'Responsible person or organization document number (only numbers)'
|
|
370
|
+
},
|
|
371
|
+
'inscription_type': {
|
|
372
|
+
'type': 'string',
|
|
373
|
+
'enum': [ 'State', 'Municipal' ],
|
|
374
|
+
'description': 'Municipal or state registration if exists'
|
|
375
|
+
},
|
|
376
|
+
'inscription_number': {
|
|
377
|
+
'type': 'string',
|
|
378
|
+
'maxLength': 50,
|
|
379
|
+
'description': 'Municipal or state registration number (with characters) if exists'
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
'description': 'Order buyer info'
|
|
383
|
+
},
|
|
384
|
+
'payer': {
|
|
385
|
+
'type': 'object',
|
|
386
|
+
'additionalProperties': false,
|
|
387
|
+
'properties': {
|
|
388
|
+
'fullname': {
|
|
389
|
+
'type': 'string',
|
|
390
|
+
'maxLength': 255,
|
|
391
|
+
'description': 'Payer full name or company corporate name'
|
|
392
|
+
},
|
|
393
|
+
'birth_date': {
|
|
394
|
+
'type': 'object',
|
|
395
|
+
'additionalProperties': false,
|
|
396
|
+
'properties': {
|
|
397
|
+
'day': {
|
|
398
|
+
'type': 'integer',
|
|
399
|
+
'min': 1,
|
|
400
|
+
'max': 31,
|
|
401
|
+
'description': 'Day of birth'
|
|
402
|
+
},
|
|
403
|
+
'month': {
|
|
404
|
+
'type': 'integer',
|
|
405
|
+
'min': 1,
|
|
406
|
+
'max': 12,
|
|
407
|
+
'description': 'Number of month of birth'
|
|
408
|
+
},
|
|
409
|
+
'year': {
|
|
410
|
+
'type': 'integer',
|
|
411
|
+
'min': 1800,
|
|
412
|
+
'max': 2200,
|
|
413
|
+
'description': 'Year of birth'
|
|
414
|
+
}
|
|
415
|
+
},
|
|
416
|
+
'description': 'Date of payer birth'
|
|
417
|
+
},
|
|
418
|
+
'phone': {
|
|
419
|
+
'type': 'object',
|
|
420
|
+
'additionalProperties': false,
|
|
421
|
+
'required': [ 'number' ],
|
|
422
|
+
'properties': {
|
|
423
|
+
'country_code': {
|
|
424
|
+
'type': 'integer',
|
|
425
|
+
'min': 1,
|
|
426
|
+
'max': 999,
|
|
427
|
+
'description': 'Country calling code (without +), defined by standards E.123 and E.164'
|
|
428
|
+
},
|
|
429
|
+
'number': {
|
|
430
|
+
'type': 'string',
|
|
431
|
+
'maxLength': 19,
|
|
432
|
+
'pattern': '^[0-9]+$',
|
|
433
|
+
'description': 'The actual phone number, digits only'
|
|
434
|
+
},
|
|
435
|
+
'type': {
|
|
436
|
+
'type': 'string',
|
|
437
|
+
'enum': [ 'home', 'personal', 'work', 'other' ],
|
|
438
|
+
'description': 'The type of phone'
|
|
439
|
+
}
|
|
440
|
+
},
|
|
441
|
+
'description': 'Payer contact phone'
|
|
442
|
+
},
|
|
443
|
+
'registry_type': {
|
|
444
|
+
'type': 'string',
|
|
445
|
+
'enum': [ 'p', 'j' ],
|
|
446
|
+
'description': 'Physical or juridical (company) person'
|
|
447
|
+
},
|
|
448
|
+
'doc_country': {
|
|
449
|
+
'type': 'string',
|
|
450
|
+
'minLength': 2,
|
|
451
|
+
'maxLength': 2,
|
|
452
|
+
'pattern': '^[A-Z]+$',
|
|
453
|
+
'description': 'Country of document origin, an ISO 3166-2 code'
|
|
454
|
+
},
|
|
455
|
+
'doc_number': {
|
|
456
|
+
'type': 'string',
|
|
457
|
+
'maxLength': 19,
|
|
458
|
+
'pattern': '^[0-9]+$',
|
|
459
|
+
'description': 'Responsible person or organization document number (only numbers)'
|
|
460
|
+
}
|
|
461
|
+
},
|
|
462
|
+
'description': 'Transation payer info'
|
|
463
|
+
},
|
|
464
|
+
'intermediator_buyer_id': {
|
|
465
|
+
'type': 'string',
|
|
466
|
+
'maxLength': 255,
|
|
467
|
+
'description': 'ID of customer account in the intermediator'
|
|
468
|
+
},
|
|
469
|
+
'billing_address': {
|
|
470
|
+
'$ref': '#/definitions/address',
|
|
471
|
+
'description': 'The mailing address associated with the payment method'
|
|
472
|
+
},
|
|
473
|
+
'to': {
|
|
474
|
+
'$ref': '#/definitions/address',
|
|
475
|
+
'description': 'Shipping address (recipient)'
|
|
476
|
+
},
|
|
477
|
+
'credit_card': {
|
|
478
|
+
'type': 'object',
|
|
479
|
+
'additionalProperties': false,
|
|
480
|
+
'properties': {
|
|
481
|
+
'holder_name': {
|
|
482
|
+
'type': 'string',
|
|
483
|
+
'maxLength': 100,
|
|
484
|
+
'description': 'Full name of the holder, as it is on the credit card'
|
|
485
|
+
},
|
|
486
|
+
'bin': {
|
|
487
|
+
'type': 'integer',
|
|
488
|
+
'min': 1,
|
|
489
|
+
'max': 9999999,
|
|
490
|
+
'description': 'Issuer identification number (IIN), known as bank identification number (BIN)'
|
|
491
|
+
},
|
|
492
|
+
'company': {
|
|
493
|
+
'type': 'string',
|
|
494
|
+
'maxLength': 100,
|
|
495
|
+
'description': 'Credit card issuer name, eg.: Visa, American Express, MasterCard'
|
|
496
|
+
},
|
|
497
|
+
'last_digits': {
|
|
498
|
+
'type': 'string',
|
|
499
|
+
'maxLength': 4,
|
|
500
|
+
'pattern': '^[0-9]+$',
|
|
501
|
+
'description': 'Last digits (up to 4) of credit card number'
|
|
502
|
+
},
|
|
503
|
+
'token': {
|
|
504
|
+
'type': 'string',
|
|
505
|
+
'maxLength': 255,
|
|
506
|
+
'description': 'Unique credit card token'
|
|
507
|
+
},
|
|
508
|
+
'cvv': {
|
|
509
|
+
'type': 'integer',
|
|
510
|
+
'min': 99,
|
|
511
|
+
'max': 99999,
|
|
512
|
+
'description': 'Credit card CVV number (Card Verification Value)'
|
|
513
|
+
},
|
|
514
|
+
'hash': {
|
|
515
|
+
'type': 'string',
|
|
516
|
+
'maxLength': 6000,
|
|
517
|
+
'description': 'Credit card encrypted hash'
|
|
518
|
+
},
|
|
519
|
+
'save': {
|
|
520
|
+
'type': 'boolean',
|
|
521
|
+
'default': true,
|
|
522
|
+
'description': 'Whether the hashed credit card should be saved for further use'
|
|
523
|
+
}
|
|
524
|
+
},
|
|
525
|
+
'description': 'Credit card data, if payment will be done with credit card'
|
|
526
|
+
},
|
|
527
|
+
'installments_number': {
|
|
528
|
+
'type': 'integer',
|
|
529
|
+
'minimum': 1,
|
|
530
|
+
'maximum': 199,
|
|
531
|
+
'description': 'Number of installments chosen'
|
|
532
|
+
},
|
|
533
|
+
'loyalty_points_applied': {
|
|
534
|
+
'type': 'object',
|
|
535
|
+
'additionalProperties': false,
|
|
536
|
+
'maxProperties': 30,
|
|
537
|
+
'patternProperties': {
|
|
538
|
+
'^[a-z0-9_]{2,30}$': {
|
|
539
|
+
'type': 'number',
|
|
540
|
+
// 'multipleOf': 0.00001,
|
|
541
|
+
'minimum': 0,
|
|
542
|
+
'maximum': 999999999,
|
|
543
|
+
'description': 'Number of loyalty points used'
|
|
544
|
+
}
|
|
545
|
+
},
|
|
546
|
+
'description': 'Customer\'s loyalty points applied, program ID as property'
|
|
547
|
+
},
|
|
548
|
+
'order_id': {
|
|
549
|
+
'type': 'string',
|
|
550
|
+
'pattern': '^[a-f0-9]{24}$',
|
|
551
|
+
'description': 'ID of created order'
|
|
552
|
+
},
|
|
553
|
+
'order_number': {
|
|
554
|
+
'type': 'integer',
|
|
555
|
+
'min': 1,
|
|
556
|
+
'max': 999999999,
|
|
557
|
+
'description': 'Number of created order'
|
|
558
|
+
},
|
|
559
|
+
'open_payment_id': {
|
|
560
|
+
'type': 'string',
|
|
561
|
+
'maxLength': 255,
|
|
562
|
+
'description': 'Payment or order ID if pre committed on gateway (authorization/capture)'
|
|
563
|
+
},
|
|
564
|
+
'utm': {
|
|
565
|
+
'type': 'object',
|
|
566
|
+
'additionalProperties': false,
|
|
567
|
+
'properties': {
|
|
568
|
+
'source': {
|
|
569
|
+
'type': 'string',
|
|
570
|
+
'maxLength': 100,
|
|
571
|
+
'description': 'Parameter "utm_source", the referrer: (e.g. google, newsletter)'
|
|
572
|
+
},
|
|
573
|
+
'medium': {
|
|
574
|
+
'type': 'string',
|
|
575
|
+
'maxLength': 100,
|
|
576
|
+
'description': 'Parameter "utm_medium", the marketing medium: (e.g. cpc, banner, email)'
|
|
577
|
+
},
|
|
578
|
+
'campaign': {
|
|
579
|
+
'type': 'string',
|
|
580
|
+
'maxLength': 200,
|
|
581
|
+
'description': 'Parameter "utm_campaign", the product, promo code, or slogan (e.g. spring_sale)'
|
|
582
|
+
},
|
|
583
|
+
'term': {
|
|
584
|
+
'type': 'string',
|
|
585
|
+
'maxLength': 100,
|
|
586
|
+
'description': 'Parameter "utm_term", identifies the paid keywords'
|
|
587
|
+
},
|
|
588
|
+
'content': {
|
|
589
|
+
'type': 'string',
|
|
590
|
+
'maxLength': 255,
|
|
591
|
+
'description': 'Parameter "utm_content", used to differentiate ads'
|
|
592
|
+
}
|
|
593
|
+
},
|
|
594
|
+
'description': 'UTM campaign HTTP parameters'
|
|
595
|
+
},
|
|
596
|
+
'affiliate_code': {
|
|
597
|
+
'type': 'string',
|
|
598
|
+
'maxLength': 200,
|
|
599
|
+
'description': 'Code to identify the affiliate that referred the customer'
|
|
600
|
+
},
|
|
601
|
+
'browser_ip': {
|
|
602
|
+
'type': 'string',
|
|
603
|
+
'maxLength': 50,
|
|
604
|
+
'description': 'IP address of the browser used by the customer when placing the order'
|
|
605
|
+
},
|
|
606
|
+
'channel_id': {
|
|
607
|
+
'type': 'integer',
|
|
608
|
+
'min': 10000,
|
|
609
|
+
'max': 4294967295,
|
|
610
|
+
'description': 'Channel unique identificator'
|
|
611
|
+
},
|
|
612
|
+
'channel_type': {
|
|
613
|
+
'type': 'string',
|
|
614
|
+
'maxLength': 20,
|
|
615
|
+
'enum': [ 'ecommerce', 'mobile', 'pdv', 'button', 'facebook', 'chatbot' ],
|
|
616
|
+
'default': 'ecommerce',
|
|
617
|
+
'description': 'Channel type or source'
|
|
618
|
+
},
|
|
619
|
+
'domain': {
|
|
620
|
+
'type': 'string',
|
|
621
|
+
'minLength': 4,
|
|
622
|
+
'maxLength': 100,
|
|
623
|
+
'pattern': '^[0-9a-z-.]+$',
|
|
624
|
+
'description': 'Store domain name (numbers and lowercase letters, eg.: www.myshop.sample)'
|
|
625
|
+
},
|
|
626
|
+
'lang': {
|
|
627
|
+
'type': 'string',
|
|
628
|
+
'pattern': '^[a-z]{2}(_[a-z]{2})?$',
|
|
629
|
+
'description': 'Language two letters code, sometimes with region, eg.: pt_br, fr, en_us'
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
};
|
|
633
|
+
|
|
634
|
+
exports.params = schema;
|
|
635
|
+
|
|
636
|
+
exports.response = {
|
|
637
|
+
'description': schema.description,
|
|
638
|
+
'type': 'object',
|
|
639
|
+
'required': [ 'transaction' ],
|
|
640
|
+
'additionalProperties': false,
|
|
641
|
+
'properties': {
|
|
642
|
+
'transaction': {
|
|
643
|
+
'type': 'object',
|
|
644
|
+
'additionalProperties': false,
|
|
645
|
+
'required': [ 'amount' ],
|
|
646
|
+
'properties': {
|
|
647
|
+
'payment_link': {
|
|
648
|
+
'type': 'string',
|
|
649
|
+
'maxLength': 1000,
|
|
650
|
+
'format': 'uri',
|
|
651
|
+
'description': 'Direct link to pay current transaction'
|
|
652
|
+
},
|
|
653
|
+
'payment_instructions': {
|
|
654
|
+
'type': 'string',
|
|
655
|
+
'maxLength': 1000,
|
|
656
|
+
'description': 'Additional text instructions for manual payments'
|
|
657
|
+
},
|
|
658
|
+
'intermediator': {
|
|
659
|
+
'type': 'object',
|
|
660
|
+
'additionalProperties': false,
|
|
661
|
+
'properties': {
|
|
662
|
+
'transaction_id': {
|
|
663
|
+
'type': 'string',
|
|
664
|
+
'maxLength': 255,
|
|
665
|
+
'description': 'Transaction ID in the intermediator'
|
|
666
|
+
},
|
|
667
|
+
'transaction_code': {
|
|
668
|
+
'type': 'string',
|
|
669
|
+
'maxLength': 255,
|
|
670
|
+
'description': 'Transaction code in the intermediator'
|
|
671
|
+
},
|
|
672
|
+
'transaction_reference': {
|
|
673
|
+
'type': 'string',
|
|
674
|
+
'maxLength': 255,
|
|
675
|
+
'description': 'Transaction reference code'
|
|
676
|
+
},
|
|
677
|
+
'payment_method': {
|
|
678
|
+
'type': 'object',
|
|
679
|
+
'required': [ 'code' ],
|
|
680
|
+
'additionalProperties': false,
|
|
681
|
+
'properties': {
|
|
682
|
+
'code': {
|
|
683
|
+
'type': 'string',
|
|
684
|
+
'maxLength': 100,
|
|
685
|
+
'description': 'Payment method code'
|
|
686
|
+
},
|
|
687
|
+
'name': {
|
|
688
|
+
'type': 'string',
|
|
689
|
+
'maxLength': 200,
|
|
690
|
+
'description': 'Short description for payment method'
|
|
691
|
+
}
|
|
692
|
+
},
|
|
693
|
+
'description': 'Payment method as defined by intermediator'
|
|
694
|
+
},
|
|
695
|
+
'buyer_id': {
|
|
696
|
+
'type': 'string',
|
|
697
|
+
'maxLength': 255,
|
|
698
|
+
'description': 'ID of customer account in the intermediator'
|
|
699
|
+
}
|
|
700
|
+
},
|
|
701
|
+
'description': 'Transaction properties in the intermediator'
|
|
702
|
+
},
|
|
703
|
+
'credit_card': {
|
|
704
|
+
'type': 'object',
|
|
705
|
+
'additionalProperties': false,
|
|
706
|
+
'properties': {
|
|
707
|
+
'holder_name': {
|
|
708
|
+
'type': 'string',
|
|
709
|
+
'maxLength': 100,
|
|
710
|
+
'description': 'Full name of the holder, as it is on the credit card'
|
|
711
|
+
},
|
|
712
|
+
'avs_result_code': {
|
|
713
|
+
'type': [ 'string', 'null' ],
|
|
714
|
+
'maxLength': 1,
|
|
715
|
+
'pattern': '^[A-Z]$',
|
|
716
|
+
'description': 'Response code from AVS: http://www.emsecommerce.net/avs_cvv2_response_codes.htm'
|
|
717
|
+
},
|
|
718
|
+
'cvv_result_code': {
|
|
719
|
+
'type': [ 'string', 'null' ],
|
|
720
|
+
'maxLength': 1,
|
|
721
|
+
'pattern': '^[A-Z]$',
|
|
722
|
+
'description': 'Response code from credit card company, such as AVS result code'
|
|
723
|
+
},
|
|
724
|
+
'bin': {
|
|
725
|
+
'type': 'integer',
|
|
726
|
+
'min': 1,
|
|
727
|
+
'max': 9999999,
|
|
728
|
+
'description': 'Issuer identification number (IIN), known as bank identification number (BIN)'
|
|
729
|
+
},
|
|
730
|
+
'company': {
|
|
731
|
+
'type': 'string',
|
|
732
|
+
'maxLength': 100,
|
|
733
|
+
'description': 'Credit card issuer name, eg.: Visa, American Express, MasterCard'
|
|
734
|
+
},
|
|
735
|
+
'last_digits': {
|
|
736
|
+
'type': 'string',
|
|
737
|
+
'maxLength': 4,
|
|
738
|
+
'pattern': '^[0-9]+$',
|
|
739
|
+
'description': 'Last digits (up to 4) of credit card number'
|
|
740
|
+
},
|
|
741
|
+
'token': {
|
|
742
|
+
'type': 'string',
|
|
743
|
+
'maxLength': 255,
|
|
744
|
+
'description': 'Unique credit card token'
|
|
745
|
+
},
|
|
746
|
+
'error_code': {
|
|
747
|
+
'type': 'string',
|
|
748
|
+
'enum': [
|
|
749
|
+
'incorrect_number',
|
|
750
|
+
'invalid_number',
|
|
751
|
+
'invalid_expiry_date',
|
|
752
|
+
'invalid_cvc',
|
|
753
|
+
'expired_card',
|
|
754
|
+
'incorrect_cvc',
|
|
755
|
+
'incorrect_zip',
|
|
756
|
+
'incorrect_address',
|
|
757
|
+
'card_declined',
|
|
758
|
+
'processing_error',
|
|
759
|
+
'call_issuer',
|
|
760
|
+
'pick_up_card'
|
|
761
|
+
],
|
|
762
|
+
'description': 'Credit card processing standardized error code'
|
|
763
|
+
}
|
|
764
|
+
},
|
|
765
|
+
'description': 'Credit card data, if payment was done with credit card'
|
|
766
|
+
},
|
|
767
|
+
'banking_billet': {
|
|
768
|
+
'type': 'object',
|
|
769
|
+
'additionalProperties': false,
|
|
770
|
+
'properties': {
|
|
771
|
+
'code': {
|
|
772
|
+
'type': 'string',
|
|
773
|
+
'maxLength': 200,
|
|
774
|
+
'description': 'Ticket code, generally a barcode number'
|
|
775
|
+
},
|
|
776
|
+
'valid_thru': {
|
|
777
|
+
'type': 'string',
|
|
778
|
+
'format': 'date-time',
|
|
779
|
+
'description': 'Date and time of expiration, in ISO 8601 standard representation'
|
|
780
|
+
},
|
|
781
|
+
'text_lines': {
|
|
782
|
+
'type': 'array',
|
|
783
|
+
'maxItems': 5,
|
|
784
|
+
'items': {
|
|
785
|
+
'type': 'string',
|
|
786
|
+
'maxLength': 255,
|
|
787
|
+
'description': 'Phrase or paragraph'
|
|
788
|
+
},
|
|
789
|
+
'description': 'Text lines on ticket'
|
|
790
|
+
},
|
|
791
|
+
'link': {
|
|
792
|
+
'type': 'string',
|
|
793
|
+
'maxLength': 255,
|
|
794
|
+
'format': 'uri',
|
|
795
|
+
'description': 'Direct link (URI) to banking billet'
|
|
796
|
+
}
|
|
797
|
+
},
|
|
798
|
+
'description': 'Banking billet data, if payment was done with banking billet'
|
|
799
|
+
},
|
|
800
|
+
'loyalty_points': {
|
|
801
|
+
'type': 'object',
|
|
802
|
+
'required': [ 'program_id', 'points_value' ],
|
|
803
|
+
'additionalProperties': false,
|
|
804
|
+
'properties': {
|
|
805
|
+
'name': {
|
|
806
|
+
'type': 'string',
|
|
807
|
+
'maxLength': 50,
|
|
808
|
+
'description': 'The name of the loyalty points program'
|
|
809
|
+
},
|
|
810
|
+
'program_id': {
|
|
811
|
+
'type': 'string',
|
|
812
|
+
'pattern': '^[a-z0-9_]{2,30}$',
|
|
813
|
+
'description': 'Unique identifier, program name using only lowercase, numbers and underscore'
|
|
814
|
+
},
|
|
815
|
+
'points_value': {
|
|
816
|
+
'type': 'number',
|
|
817
|
+
// 'multipleOf': 0.00001,
|
|
818
|
+
'minimum': 0,
|
|
819
|
+
'maximum': 999999999,
|
|
820
|
+
'description': 'Number of loyalty points applied from customer account'
|
|
821
|
+
},
|
|
822
|
+
'ratio': {
|
|
823
|
+
'type': 'number',
|
|
824
|
+
// 'multipleOf': 0.001,
|
|
825
|
+
'minimum': 0,
|
|
826
|
+
'maximum': 9999,
|
|
827
|
+
'description': 'The ratio of a point when converted to currency'
|
|
828
|
+
}
|
|
829
|
+
},
|
|
830
|
+
'description': 'If paid with loyalty points, specify how many points and what program was consumed'
|
|
831
|
+
},
|
|
832
|
+
'currency_id': {
|
|
833
|
+
'type': 'string',
|
|
834
|
+
'pattern': '^[A-Z]{3}$',
|
|
835
|
+
'description': 'Currency ID specific for this transaction, if different of order currency ID'
|
|
836
|
+
},
|
|
837
|
+
'currency_symbol': {
|
|
838
|
+
'type': 'string',
|
|
839
|
+
'maxLength': 20,
|
|
840
|
+
'description': 'Currency symbol specific for this transaction'
|
|
841
|
+
},
|
|
842
|
+
'discount': {
|
|
843
|
+
'type': 'number',
|
|
844
|
+
// 'multipleOf': 0.0001,
|
|
845
|
+
'minimum': -999999999,
|
|
846
|
+
'maximum': 999999999,
|
|
847
|
+
'description': 'Discount by payment method, negative if value was additionated (not discounted)'
|
|
848
|
+
},
|
|
849
|
+
'amount': {
|
|
850
|
+
'type': 'number',
|
|
851
|
+
// 'multipleOf': 0.00001,
|
|
852
|
+
'minimum': 0,
|
|
853
|
+
'maximum': 9999999999,
|
|
854
|
+
'description': 'Transaction amount, disregarding installment rates'
|
|
855
|
+
},
|
|
856
|
+
'installments': {
|
|
857
|
+
'type': 'object',
|
|
858
|
+
'required': [ 'number' ],
|
|
859
|
+
'additionalProperties': false,
|
|
860
|
+
'properties': {
|
|
861
|
+
'number': {
|
|
862
|
+
'type': 'integer',
|
|
863
|
+
'minimum': 1,
|
|
864
|
+
'maximum': 199,
|
|
865
|
+
'description': 'Number of installments'
|
|
866
|
+
},
|
|
867
|
+
'value': {
|
|
868
|
+
'type': 'number',
|
|
869
|
+
// 'multipleOf': 0.00001,
|
|
870
|
+
'minimum': 0,
|
|
871
|
+
'maximum': 9999999999,
|
|
872
|
+
'description': 'Installment value'
|
|
873
|
+
},
|
|
874
|
+
'tax': {
|
|
875
|
+
'type': 'boolean',
|
|
876
|
+
'default': false,
|
|
877
|
+
'description': 'Tax applied'
|
|
878
|
+
},
|
|
879
|
+
'total': {
|
|
880
|
+
'type': 'number',
|
|
881
|
+
// 'multipleOf': 0.00001,
|
|
882
|
+
'minimum': 0,
|
|
883
|
+
'maximum': 9999999999,
|
|
884
|
+
'description': 'Total value, sum of all plots'
|
|
885
|
+
}
|
|
886
|
+
},
|
|
887
|
+
'description': 'Installments option'
|
|
888
|
+
},
|
|
889
|
+
'creditor_fees': {
|
|
890
|
+
'type': 'object',
|
|
891
|
+
'additionalProperties': false,
|
|
892
|
+
'properties': {
|
|
893
|
+
'installment': {
|
|
894
|
+
'type': 'number',
|
|
895
|
+
// 'multipleOf': 0.00001,
|
|
896
|
+
'minimum': 0,
|
|
897
|
+
'maximum': 99999999,
|
|
898
|
+
'description': 'Installment fee'
|
|
899
|
+
},
|
|
900
|
+
'operational': {
|
|
901
|
+
'type': 'number',
|
|
902
|
+
// 'multipleOf': 0.00001,
|
|
903
|
+
'minimum': 0,
|
|
904
|
+
'maximum': 99999999,
|
|
905
|
+
'description': 'Operation fee'
|
|
906
|
+
},
|
|
907
|
+
'intermediation': {
|
|
908
|
+
'type': 'number',
|
|
909
|
+
// 'multipleOf': 0.00001,
|
|
910
|
+
'minimum': 0,
|
|
911
|
+
'maximum': 99999999,
|
|
912
|
+
'description': 'Intermediation fee, if transaction have an intermediary'
|
|
913
|
+
},
|
|
914
|
+
'other': {
|
|
915
|
+
'type': 'number',
|
|
916
|
+
// 'multipleOf': 0.00001,
|
|
917
|
+
'minimum': 0,
|
|
918
|
+
'maximum': 99999999,
|
|
919
|
+
'description': 'Sum of other transaction rates'
|
|
920
|
+
}
|
|
921
|
+
},
|
|
922
|
+
'description': 'Cost data collected'
|
|
923
|
+
},
|
|
924
|
+
'status': {
|
|
925
|
+
'type': 'object',
|
|
926
|
+
'additionalProperties': false,
|
|
927
|
+
'required': [ 'current' ],
|
|
928
|
+
'properties': {
|
|
929
|
+
'updated_at': {
|
|
930
|
+
'type': 'string',
|
|
931
|
+
'format': 'date-time',
|
|
932
|
+
'description': 'Last status change, date and time in ISO 8601 standard representation'
|
|
933
|
+
},
|
|
934
|
+
'current': {
|
|
935
|
+
'type': 'string',
|
|
936
|
+
'enum': [
|
|
937
|
+
'pending',
|
|
938
|
+
'under_analysis',
|
|
939
|
+
'authorized',
|
|
940
|
+
'unauthorized',
|
|
941
|
+
'paid',
|
|
942
|
+
'in_dispute',
|
|
943
|
+
'refunded',
|
|
944
|
+
'voided',
|
|
945
|
+
'unknown'
|
|
946
|
+
],
|
|
947
|
+
'default': 'pending',
|
|
948
|
+
'description': 'Payment status'
|
|
949
|
+
}
|
|
950
|
+
},
|
|
951
|
+
'description': 'Financial status and date of change'
|
|
952
|
+
},
|
|
953
|
+
'flags': {
|
|
954
|
+
'type': 'array',
|
|
955
|
+
'uniqueItems': true,
|
|
956
|
+
'maxItems': 10,
|
|
957
|
+
'items': {
|
|
958
|
+
'type': 'string',
|
|
959
|
+
'maxLength': 20,
|
|
960
|
+
'description': 'Flag title'
|
|
961
|
+
},
|
|
962
|
+
'description': 'Flags to associate additional info'
|
|
963
|
+
},
|
|
964
|
+
'custom_fields': {
|
|
965
|
+
'type': 'array',
|
|
966
|
+
'maxItems': 10,
|
|
967
|
+
'items': {
|
|
968
|
+
'type': 'object',
|
|
969
|
+
'additionalProperties': false,
|
|
970
|
+
'required': [ 'field', 'value' ],
|
|
971
|
+
'properties': {
|
|
972
|
+
'field': {
|
|
973
|
+
'type': 'string',
|
|
974
|
+
'maxLength': 50,
|
|
975
|
+
'description': 'Field name'
|
|
976
|
+
},
|
|
977
|
+
'value': {
|
|
978
|
+
'type': 'string',
|
|
979
|
+
'maxLength': 255,
|
|
980
|
+
'description': 'Field value'
|
|
981
|
+
}
|
|
982
|
+
},
|
|
983
|
+
'description': 'Custom field object'
|
|
984
|
+
},
|
|
985
|
+
'description': 'List of custom fields'
|
|
986
|
+
},
|
|
987
|
+
'notes': {
|
|
988
|
+
'type': 'string',
|
|
989
|
+
'maxLength': 8000,
|
|
990
|
+
'description': 'Optional notes with additional info about this transaction'
|
|
991
|
+
}
|
|
992
|
+
},
|
|
993
|
+
'description': 'Created payment transaction object'
|
|
994
|
+
},
|
|
995
|
+
'redirect_to_payment': {
|
|
996
|
+
'type': 'boolean',
|
|
997
|
+
'default': false,
|
|
998
|
+
'description': 'Whether the buyer should be redirected to payment link right after checkout'
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
1001
|
+
};
|