Desarrolladores
Webhooks
10min
Un webhook es un mecanismo mediante el cual Unicobros será capaz de notificar mediante HTTP POST a su servidor cuando una transacción sea realizada o cambie de estado, así usted podrá tomar las acciones necesarias en su sistema al efecto de reflejar el nuevo estado de una operación.
- Checkout
- Ordenes de Pago
- Suscripciones
- Checkout: Checkout agregará al final del Objeto "data" un nodo con tu información personalizada, tal como el ID de Checkout
- Subscription: El módulo de Suscripciones agregará información sobre la suscripción, suscriptor y ejecución al final del Objeto "data".
- Órdenes de Pago: El módulo Ordenes de Pago no agrega datos adicionales.
Para poder utilizar el servicio de Webhooks, la plataforma destino debera soportar cifrado TLS 1.2 en adelante, no debiendo soportar las versiones 1.1 y anteriores.
Headers
Content-Type: application/json
JSON
1{
2 "type": "checkout",
3 "data": {
4 "result": true,
5 "view": {
6 "type": "cash",
7 "options": {
8 "barcode": true
9 }
10 },
11 "payment": {
12 "id": "xcnAQ5dDO",
13 "description": "Venta de producto",
14 "operation": {
15 "type": "payment.v2"
16 },
17 "status": {
18 "code": "2",
19 "text": "En Espera",
20 "message": "El cupón vence en 24hs."
21 },
22 "total": 1333,
23 "currency": {
24 "code": "TEST",
25 "text": "Test Money",
26 "symbol": "T$"
27 },
28 "riskAnalysis": {
29 "band": "N/A",
30 "level": "N/A"
31 },
32 "created": "2020-12-04T00:08:45.604Z",
33 "updated": "2020-12-04T00:08:46.154Z",
34 "reference": "29",
35 "source": {
36 "name": "Rapipago/PagoFácil",
37 "type": "cash",
38 "reference": "arg_unicobros_cash",
39 "barcode": "044715261462012050133300000000000000000000515003571363",
40 "url": "https://utils.mobbex.com/barcode/044715261462012050133300000000000000000000515003571363?bcid=interleaved2of5&includetext=1&textxalign=center&textsize=11"
41 }
42 },
43 "entity": {
44 "name": "Wayne Inc",
45 "uid": "iambatman"
46 },
47 "customer": {
48 "uid": "12123123",
49 "name": "Juan Perez Wayne",
50 "phone": "12123123",
51 "identification": "110303456",
52 "email": "[email protected]"
53 },
54 "user": {
55 "name": "Juan Perez Wayne",
56 "email": "[email protected]"
57 },
58 "source": {
59 "name": "Rapipago/PagoFácil",
60 "type": "cash",
61 "reference": "arg_unicobros_cash"
62 },
63 "checkout": {
64 "uid": "TK0L70HEE9M4T6EBPH"
65 }
66 }
67}
JSON
1{
2 "data": {
3 "checkout": {
4 "currency": "ARS",
5 "total": 145170,
6 "uid": "CHK:UOUIOWAM3NU1BE19WB"
7 },
8 "customer": {
9 "email": "[email protected]",
10 "identification": "12123123",
11 "name": "Bruce Wayne",
12 "phone": "+541122334455",
13 "uid": "48186e4f-8bda-4d0f-95e1-430d89a187ef"
14 },
15 "entity": {
16 "name": "DEMO S.A.",
17 "uid": "123LRVRtO"
18 },
19 "ipAddress": "192.228.17.57",
20 "payment": {
21 "created": "2024-04-16T23:04:40.523Z",
22 "currency": {
23 "code": "ARS",
24 "locale": "es-AR",
25 "symbol": "$",
26 "text": "Peso Argentino"
27 },
28 "description": "Orden 11111111111",
29 "id": "3Z6D9YF71L0LGGRR8DRT3W",
30 "operation": {
31 "type": "payment.v2"
32 },
33 "reference": "1111111111",
34 "requestedCurrency": {
35 "code": "ARS",
36 "locale": "es-AR",
37 "symbol": "$",
38 "text": "Peso Argentino"
39 },
40 "requestedTotal": 145170,
41 "riskAnalysis": {
42 "band": "N/A",
43 "level": "N/A"
44 },
45 "source": {
46 "cardholder": {
47 "identification": "12123123",
48 "name": "Bruce Wayne"
49 },
50 "expiration": {
51 "month": "06",
52 "year": "24"
53 },
54 "installment": {
55 "amount": 145170,
56 "count": 1,
57 "description": "1 Cuota",
58 "reference": "1",
59 "tags": [],
60 "uid": "NzqWp58GA"
61 },
62 "name": "Visa Banco Santander",
63 "number": "46600000****4601",
64 "reference": "visa.santanderrio",
65 "transaction": {
66 "authorizationCode": "004288",
67 "batchNo": "",
68 "resultCode": "0",
69 "retrievalReferenceNo": "410723133668",
70 "ticketNo": "",
71 "transactionId": "3Z6D9YF71L0LGGRR8DRT3W"
72 },
73 "type": "card",
74 "variant": "credit"
75 },
76 "status": {
77 "code": "200",
78 "data": {},
79 "message": "Transacción Aprobada",
80 "resultCode": "0",
81 "text": "Aprobado",
82 "view": "default"
83 },
84 "total": 145170,
85 "updated": "2024-04-16T23:04:42.146Z"
86 },
87 "result": true,
88 "source": {
89 "name": "Visa Banco Santander",
90 "reference": "visa.santanderrio",
91 "type": "card"
92 },
93 "user": {
94 "email": "[email protected]",
95 "name": "Bruce Wayne"
96 },
97 "view": {
98 "type": "card"
99 }
100 },
101 "type": "checkout"
102 }
JSON
1{
2 "type": "checkout",
3 "data": {
4 "result": true,
5 "view": {
6 "type": "card"
7 },
8 "payment": {
9 "id": "ABC1234",
10 "description": "Mi Descripción",
11 "operation": {
12 "type": "payment.v2"
13 },
14 "status": {
15 "code": "200",
16 "text": "Aprobado",
17 "message": "Transacción Aprobada"
18 },
19 "total": 1564.33,
20 "currency": {
21 "code": "ARS",
22 "text": "Peso Argentino",
23 "symbol": "$"
24 },
25 "riskAnalysis": {
26 "band": "red",
27 "level": 7.1
28 },
29 "created": "2020-12-04T21:27:26.348Z",
30 "updated": "2020-12-04T21:27:28.280Z",
31 "reference": "external_reference",
32 "source": {
33 "cardholder": {
34 "identification": "12123123",
35 "name": "Demo"
36 },
37 "expiration": {
38 "month": "12",
39 "year": "34"
40 },
41 "installment": {
42 "amount": 10,
43 "count": 1,
44 "description": "Débito",
45 "reference": "1"
46 },
47 "name": "Visa Débito",
48 "number": "450799******0010",
49 "reference": "visa.debit",
50 "transaction": {
51 "authorizationCode": "462515385471",
52 "batchNo": "",
53 "resultCode": "0",
54 "retrievalReferenceNo": "",
55 "ticketNo": "258570348489",
56 "transactionId": "CHD-E0ECYCAI5EI5DXRA6K"
57 },
58 "type": "card"
59 }
60 },
61 "entity": {
62 "name": "Wayne Inc",
63 "uid": "iambatman"
64 },
65 "customer": {
66 "uid": "12123123",
67 "name": "Juan Perez Wayne",
68 "phone": "12123123",
69 "identification": "110303456",
70 "email": "[email protected]"
71 },
72 "source": {
73 "name": "Visa",
74 "type": "card",
75 "reference": "visa"
76 },
77 "checkout": {
78 "uid": "TK0L70HEE9M4T6EBPH",
79 "total": 140.00,
80 "currency": "ARS"
81 },
82 "subscriptions": [
83 {
84 "subscription": "uid_subscription",
85 "subscriber": "uid_subscriber"
86 }
87 ]
88 }
89}
JSON
1{
2 "type": "subscription:execution",
3 "data": {
4 "result": true,
5 "view": {
6 "type": "card"
7 },
8 "payment": {
9 "id": "ABC1234",
10 "description": "Mi Descripción",
11 "operation": {
12 "type": "payment.v2"
13 },
14 "status": {
15 "code": "200",
16 "text": "Aprobado",
17 "message": "Transacción Aprobada"
18 },
19 "total": 1564.33,
20 "currency": {
21 "code": "ARS",
22 "text": "Peso Argentino",
23 "symbol": "$"
24 },
25 "riskAnalysis": {
26 "band": "red",
27 "level": 7.1
28 },
29 "created": "2020-12-04T21:27:26.348Z",
30 "updated": "2020-12-04T21:27:28.280Z",
31 "reference": "external_reference",
32 "source": {
33 "cardholder": {
34 "identification": "12123123",
35 "name": "Demo"
36 },
37 "expiration": {
38 "month": "12",
39 "year": "34"
40 },
41 "installment": {
42 "amount": 10,
43 "count": 1,
44 "description": "Débito",
45 "reference": "1"
46 },
47 "name": "Visa Débito",
48 "number": "450799******0010",
49 "reference": "visa.debit",
50 "transaction": {
51 "authorizationCode": "462515385471",
52 "batchNo": "",
53 "resultCode": "0",
54 "retrievalReferenceNo": "",
55 "ticketNo": "258570348489",
56 "transactionId": "CHD-E0ECYCAI5EI5DXRA6K"
57 },
58 "type": "card"
59 }
60 },
61 "entity": {
62 "name": "Wayne Inc",
63 "uid": "iambatman"
64 },
65 "customer": {
66 "uid": "12123123",
67 "name": "Juan Perez Wayne",
68 "phone": "12123123",
69 "identification": "110303456",
70 "email": "[email protected]"
71 },
72 "source": {
73 "name": "Visa",
74 "type": "card",
75 "reference": "visa"
76 },
77 "subscription": {
78 "uid": "CBA33333",
79 "interval": "1m",
80 "limit": 0,
81 "name": "El nombre de mi suscripción",
82 "description": "La descripción de mi suscripción",
83 "reference": "my_reference",
84 "total": 1564.33
85 },
86 "subscriber": {
87 "uid": "OFF1233",
88 "reference": "my_ref",
89 "period": 4,
90 "customer": {
91 "name": "Juan Perez Wayne",
92 "phone": "12123123",
93 "identification": "110303456",
94 "email": "[email protected]"
95 }
96 },
97 "execution": {
98 "uid": "RBCNXGNTJ8N2JV4R63"
99 }
100 }
101}
Tipo de Operatoria
- Split
- Split Distribuído
- Split Híbrido
- Multicard
- Multi-Vendor
En estos casos adicionalmente a la información standard enviada en un Webhook se enviarán las Transacciones Hijas de la operación principal bajo el campo "childs"
JSON
1{
2 "data": {
3 "checkout": {
4 "currency": "ARS",
5 "total": 10,
6 "uid": "CHK:42DQ1HJT7ZGU6O38JQ"
7 },
8 "childs": [
9 {
10 "entity": {
11 "name": "Mi Ready",
12 "uid": "myready"
13 },
14 "payment": {
15 "id": "CHD-E0ECYCAI5EI5DXRA6K",
16 "source": {
17 "cardholder": {
18 "identification": "12123123",
19 "name": "Demo"
20 },
21 "expiration": {
22 "month": "12",
23 "year": "34"
24 },
25 "installment": {
26 "amount": 10,
27 "count": 1,
28 "description": "Débito",
29 "reference": "1"
30 },
31 "name": "Visa Débito",
32 "number": "450799******0010",
33 "reference": "visa.debit",
34 "transaction": {
35 "authorizationCode": "462515385471",
36 "batchNo": "",
37 "resultCode": "0",
38 "retrievalReferenceNo": "",
39 "ticketNo": "258570348489",
40 "transactionId": "CHD-E0ECYCAI5EI5DXRA6K"
41 },
42 "type": "card"
43 },
44 "status": {
45 "code": "200",
46 "data": {},
47 "message": "Transacción Aprobada",
48 "resultCode": "0",
49 "text": "Aprobado",
50 "view": "default"
51 },
52 "total": 10
53 },
54 "source": {
55 "name": "Visa Débito",
56 "reference": "visa.debit",
57 "type": "card"
58 },
59 "view": {
60 "type": "card"
61 }
62 }
63 ],
64 "customer": {
65 "email": "[email protected]",
66 "identification": "12123123",
67 "name": "Demo Mobbex"
68 },
69 "entity": {
70 "name": "Mi Ready",
71 "uid": "myready"
72 },
73 "payment": {
74 "created": "2023-01-06T00:25:49.358Z",
75 "currency": {
76 "code": "TEST",
77 "locale": "es",
78 "symbol": "T$",
79 "text": "Test Money"
80 },
81 "description": "Descripción de la Venta",
82 "id": "GEQUU3V5AFNFN28DP73ESD",
83 "operation": {
84 "type": "payment.multiple-sources"
85 },
86 "reference": "ref_test_multicheckout_9",
87 "riskAnalysis": {
88 "band": "N/A",
89 "level": "N/A"
90 },
91 "source": {
92 "cardholder": {},
93 "expiration": {
94 "month": "",
95 "year": ""
96 },
97 "installment": {
98 "amount": 0,
99 "count": 1,
100 "description": "1",
101 "reference": ""
102 },
103 "name": "multicard",
104 "number": "",
105 "reference": "multicard",
106 "transaction": {
107 "authorizationCode": "",
108 "batchNo": "",
109 "resultCode": "",
110 "retrievalReferenceNo": "",
111 "ticketNo": "",
112 "transactionId": "GEQUU3V5AFNFN28DP73ESD"
113 },
114 "type": "card"
115 },
116 "status": {
117 "code": "200",
118 "data": {},
119 "message": "Transacción Aprobada",
120 "resultCode": -1,
121 "text": "Aprobado",
122 "view": "default"
123 },
124 "total": 10,
125 "updated": "2023-01-06T00:26:26.681Z"
126 },
127 "result": true,
128 "source": {
129 "name": "multicard",
130 "reference": "multicard",
131 "type": "card"
132 },
133 "user": {
134 "email": "[email protected]",
135 "name": "Demo unicobros"
136 },
137 "view": {
138 "type": "card"
139 }
140 },
141 "type": "checkout"
142}
Updated 22 Nov 2024
Did this page help you?