@@ -51,7 +51,7 @@ const invoice = await facturapi.invoices.create({
5151 complements: [
5252 {
5353 type: ' pago' ,
54- data: {
54+ data: [ {
5555 payment_form: ' 28' , // Tarjeta de Crédito
5656 related_documents: [
5757 {
@@ -68,7 +68,7 @@ const invoice = await facturapi.invoices.create({
6868 ]
6969 }
7070 ]
71- }
71+ }]
7272 }
7373 ]
7474});
@@ -99,24 +99,27 @@ var invoice = await facturapi.Invoice.CreateAsync(new Dictionary<string, object>
9999 new Dictionary <string , object >
100100 {
101101 [" type" ] = " pago" ,
102- [" data" ] = new Dictionary <string , object >
102+ [" data" ] = new Dictionary <string , object >[]
103103 {
104- [" payment_form" ] = " 28" , // Tarjeta de Crédito
105- [" related_documents" ] = new Dictionary <string , object >[]
104+ new Dictionary <string , object >
106105 {
107- new Dictionary <string , object >
106+ [" payment_form" ] = " 28" , // Tarjeta de Crédito
107+ [" related_documents" ] = new Dictionary <string , object >[]
108108 {
109- [" uuid" ] = " 39c85a3f-275b-4341-b259-e8971d9f8a94" ,
110- [" amount" ] = 345 . 60 ,
111- [" installment" ] = 1 ,
112- [" last_balance" ] = 345 . 60 ,
113- [" taxes" ] = new Dictionary <string , object >[]
109+ new Dictionary <string , object >
114110 {
115- new Dictionary <string , object >
111+ [" uuid" ] = " 39c85a3f-275b-4341-b259-e8971d9f8a94" ,
112+ [" amount" ] = 345 . 60 ,
113+ [" installment" ] = 1 ,
114+ [" last_balance" ] = 345 . 60 ,
115+ [" taxes" ] = new Dictionary <string , object >[]
116116 {
117- [" base" ] = 297 . 93 ,
118- [" type" ] = " IVA" ,
119- [" rate" ] = 0 . 16
117+ new Dictionary <string , object >
118+ {
119+ [" base" ] = 297 . 93 ,
120+ [" type" ] = " IVA" ,
121+ [" rate" ] = 0 . 16
122+ }
120123 }
121124 }
122125 }
@@ -148,18 +151,20 @@ $invoice = $facturapi->Invoices->create([
148151 [
149152 "type" => "pago",
150153 "data" => [
151- "payment_form" => "28", // Tarjeta de Crédito
152- "related_documents" => [
153- [
154- "uuid" => "39c85a3f-275b-4341-b259-e8971d9f8a94",
155- "amount" => 345.60,
156- "installment" => 1,
157- "last_balance" => 345.60,
158- "taxes" => [
159- [
160- "base" => 297.93,
161- "type" => "IVA",
162- "rate" => 0.16
154+ [
155+ "payment_form" => "28", // Tarjeta de Crédito
156+ "related_documents" => [
157+ [
158+ "uuid" => "39c85a3f-275b-4341-b259-e8971d9f8a94",
159+ "amount" => 345.60,
160+ "installment" => 1,
161+ "last_balance" => 345.60,
162+ "taxes" => [
163+ [
164+ "base" => 297.93,
165+ "type" => "IVA",
166+ "rate" => 0.16
167+ ]
163168 ]
164169 ]
165170 ]
@@ -191,7 +196,7 @@ curl https://www.facturapi.io/v2/invoices \
191196 "complements": [
192197 {
193198 "type": "pago",
194- "data": {
199+ "data": [ {
195200 "payment_form": "28",
196201 "related_documents": [
197202 {
@@ -208,7 +213,7 @@ curl https://www.facturapi.io/v2/invoices \
208213 ]
209214 }
210215 ]
211- }
216+ }]
212217 }
213218 ]
214219 }'
@@ -243,7 +248,7 @@ const invoice = await facturapi.invoices.create({
243248 complements: [
244249 {
245250 type: ' pago' ,
246- data: {
251+ data: [ {
247252 payment_form: ' 28' , // Tarjeta de Crédito
248253 related_documents: [
249254 {
@@ -260,7 +265,7 @@ const invoice = await facturapi.invoices.create({
260265 ]
261266 }
262267 ]
263- }
268+ }]
264269 }
265270 ]
266271});
@@ -291,24 +296,27 @@ var invoice = await facturapi.Invoice.CreateAsync(new Dictionary<string, object>
291296 new Dictionary <string , object >
292297 {
293298 [" type" ] = " pago" ,
294- [" data" ] = new Dictionary <string , object >
299+ [" data" ] = new Dictionary <string , object >[]
295300 {
296- [" payment_form" ] = " 28" , // Tarjeta de Crédito
297- [" related_documents" ] = new Dictionary <string , object >[]
301+ new Dictionary <string , object >
298302 {
299- new Dictionary <string , object >
303+ [" payment_form" ] = " 28" , // Tarjeta de Crédito
304+ [" related_documents" ] = new Dictionary <string , object >[]
300305 {
301- [" uuid" ] = " 39c85a3f-275b-4341-b259-e8971d9f8a94" ,
302- [" amount" ] = 100 , // Monto de la factura relacionada que se paga en la presente parcialidad
303- [" installment" ] = 2 , // Esta es la segunda parcialidad
304- [" last_balance" ] = 245 . 60 , // Saldo insoluto de la primera parcialidad
305- [" taxes" ] = new Dictionary <string , object >[]
306+ new Dictionary <string , object >
306307 {
307- new Dictionary <string , object >
308+ [" uuid" ] = " 39c85a3f-275b-4341-b259-e8971d9f8a94" ,
309+ [" amount" ] = 100 , // Monto de la factura relacionada que se paga en la presente parcialidad
310+ [" installment" ] = 2 , // Esta es la segunda parcialidad
311+ [" last_balance" ] = 245 . 60 , // Saldo insoluto de la primera parcialidad
312+ [" taxes" ] = new Dictionary <string , object >[]
308313 {
309- [" base" ] = 86 . 21 , // Base de IVA de la segunda parcialidad
310- [" type" ] = " IVA" ,
311- [" rate" ] = 0 . 16
314+ new Dictionary <string , object >
315+ {
316+ [" base" ] = 86 . 21 , // Base de IVA de la segunda parcialidad
317+ [" type" ] = " IVA" ,
318+ [" rate" ] = 0 . 16
319+ }
312320 }
313321 }
314322 }
@@ -340,18 +348,20 @@ $invoice = $facturapi->Invoices->create([
340348 [
341349 "type" => "pago",
342350 "data" => [
343- "payment_form" => "28", // Tarjeta de Crédito
344- "related_documents" => [
345- [
346- "uuid" => "39c85a3f-275b-4341-b259-e8971d9f8a94",
347- "amount" => 100, // Monto de la factura relacionada que se paga en la presente parcialidad
348- "installment" => 2, // Esta es la segunda parcialidad
349- "last_balance" => 245.60, // Saldo insoluto de la primera parcialidad
350- "taxes" => [
351- [
352- "base" => 86.21, // Base de IVA de la segunda parcialidad
353- "type" => "IVA",
354- "rate" => 0.16
351+ [
352+ "payment_form" => "28", // Tarjeta de Crédito
353+ "related_documents" => [
354+ [
355+ "uuid" => "39c85a3f-275b-4341-b259-e8971d9f8a94",
356+ "amount" => 100, // Monto de la factura relacionada que se paga en la presente parcialidad
357+ "installment" => 2, // Esta es la segunda parcialidad
358+ "last_balance" => 245.60, // Saldo insoluto de la primera parcialidad
359+ "taxes" => [
360+ [
361+ "base" => 86.21, // Base de IVA de la segunda parcialidad
362+ "type" => "IVA",
363+ "rate" => 0.16
364+ ]
355365 ]
356366 ]
357367 ]
@@ -383,7 +393,7 @@ curl https://www.facturapi.io/v2/invoices \
383393 "complements": [
384394 {
385395 "type": "pago",
386- "data": {
396+ "data": [ {
387397 "payment_form": "28", // Tarjeta de Crédito
388398 "related_documents": [
389399 {
@@ -400,7 +410,7 @@ curl https://www.facturapi.io/v2/invoices \
400410 ]
401411 }
402412 ]
403- }
413+ }]
404414 }
405415 ]
406416 }'
0 commit comments