---
title: Wallet
slug: O3OP-wallet
description: Learn how to generate a secure payment operation via API and personalize the payment experience with this comprehensive document. Understand the importance of safeguarding customer PAN and discover the requirements for API usage. Get step-by-step instruct
icon: {"faIcon":"fa-solid fa-wallet"}
docTags: 
createdAt: 2021-01-29T02:01:18.000Z
---

Este tipo de procesamiento permite generar una operacion via API permitiendo personalizar al máximo la experiencia de pago.. Siempre se deben tener en cuenta las medidas de seguridad adecuadas para este tipo de Operatoria donde se manipulara el PAN del Cliente.


```mermaid
sequenceDiagram
    participant Sistema
    participant Mobbex
    Sistema->>Mobbex: Crear Operacion
    Note right of Mobbex: Utilizar Private Key
    Mobbex->>Sistema: Guardar Intent Token
    Sistema->>Mobbex: Generar Token Tarjeta
    Note right of Mobbex: Utilizar Public Key
    Mobbex->>Sistema: Devuelve Token
    Sistema->>Mobbex: Generar Cobro
```



Generales
---------


Nuestro checkout transparente le permitirá generar operaciones desde su sitio siempre y cuando las mismas sean de Tipo Tarjeta de Crédito o Débito. Además como parte de la creación del checkout también se le brindará un Checkout standard para el procesamiento de medios de pago NO tarjeta. En este tipo de Checkout hay algunos datos como Customer que son Obligatorios y deben enviarse siempre, de lo contrario la operación no podrá realizarse.


Requerimientos
--------------

- Llave publica
- Llave privada

### Sitios Web

- Calificación \*\*A\*\* o mayor en https\://www\.ssllabs.com/ssltest . Si el sitio web arroja menor a A las credenciales serán desactivadas automáticamente. Todos los sitios que utilicen esta operatoria serán monitoreados a diario.
- Para Web se recomienda utilizar MobbexJS cuya función es simplificar el proceso.

### &#xA;Utilizando Script

:::BlockQuote
SDK Actual: https\://res.mobbex.com/js/sdk/mobbex\@1.1.0.js
:::

### &#xA;Utilizando NPM: Web y React Native

:::BlockQuote
npm i -S -E @mobbex/sdk
:::


Creación de Checkout
====================



:::BlockQuote
Sólo desde el lado Servidor, este método NO puede ejecutarse desde el cliente
:::

### &#xA;&#xA;1\) Crear Intencion de Cobro


`POST: https://api.mobbex.com/p/checkout`


**Cabeceras:**

- `api-key`: Llave Privada


**Parámetros:**

Admite todos los parámetros de Checkout ( https\://mobbex.dev/docs/checkout ), pero además se establecen los siguientes:

- `customer`: Objeto de tipo JSON con los datos del cliente. Obligatorios:
  - `uid`:  Identificador único e interno del cliente.
  - `createdAt`:  Debe estar en formato timestamp en milisegundos.
  - `name`: Nombre del Cliente.
  - `identification`: DNI.
  - `phone`: Número de Celular.
  - `email`: Email del Cliente
- `wallet`: Habilita la opción de billetera virtual para el almacenado de Tarjetas (Opcional). En este caso debe estar en *true*.
- `options`: Objeto con opciones.
  - `domain`:  Dominio desde el que se procesará el Checkout (Obligatorio).

**Ejemplo:**

```shell
curl --location --request POST 'https://api.mobbex.com/p/checkout' \
--header 'api-key: _8bjoCPu4xW5GCHsp5yDHzSmhMnQU1kfw7nw' \
--header 'x-lang: es' \
--header 'Content-Type: application/json' \
--data-raw '{
	"total": 5,
	"currency": "ARS",
	"reference": "2982-2XtPXlgSaWccqUyobuv4sEmLYMV0N6oX6MoridMw",
	"description": "Descripción de la Venta",
	"customer": {
		"uid": "12123123",
		"name": "Demo Mobbex",
		"identification": "23234234",
		"email": "demo@mobbex.com"
	},
  "options": {
  	"domain": "mi.dominio.com"
  }
	"wallet": true,
	"return_url": "https://localhost:8443/sale/return?session=56789",
	"webhook": "https://localhost:8443/sale/webhook?user=1234"
}'
```

**Respuesta:**
Para procesar en modo transparente se debe obtener `data.wallet.it` ya que será el parámetro necesario para el resto de las APIs.


```json
{
    "result": true,
    "data": {
        "id": "PYCNWIF9MSXV1QYLNG",
        "url": "https://local.mobbex.com:8080/p/checkout/v2/PYCNWIF9MSXV1QYLNG",
        "description": "Descripción de la Venta",
        "currency": "ARS",
        "total": 5,
        "created": 1598424066850,
        "customer": {
            "name": "Demo Mobbex"
        },
        "wallet": [
            {
                "it": "5ca170c7-b74a-469a-8e61-3635148cbc5d",
                "name": "Visa terminada en 8545",
                "source": {
                    "reference": "visa.comafi",
                    "name": "Visa Banco Comafi",
                    "shortName": "Visa Comafi",
                    "card": {
                        "currency": "ARS",
                        "product": {
                            "name": "Visa",
                            "shortName": "Visa",
                            "variant": "credit",
                            "lengths": [
                                16
                            ],
                            "gaps": [
                                4,
                                8,
                                12
                            ],
                            "code": {
                                "name": "CVV",
                                "length": 3,
                                "position": 1
                            },
                            "logo": "https://res.mobbex.com/images/sources/png/visa.png"
                        },
                        "issuer": {
                            "shortName": "Comafi",
                            "name": "Banco Comafi",
                            "color": "#789c48",
                            "logo": "https://res.mobbex.com/images/sources/png/comafi.png"
                        },
                        "level": "classic"
                    },
                    "type": "card",
                    "priority": 0
                },
                "card": {
                    "expiration_month": 2,
                    "expiration_year": 24,
                    "card_number": "402123******8888"
                },
                "installments": [
                    {
                        "name": "1 Pago",
                        "description": "1 Pago",
                        "count": 1,
                        "reference": "1",
                        "totals": {
                            "currency": {
                                "value": "ARS",
                                "label": "Peso Argentino",
                                "symbol": "$",
                                "hidden": false
                            },
                            "installment": {
                                "amount": 5.1,
                                "count": 1
                            },
                            "total": 5.1,
                            "financial": {
                                "percentage": 2,
                                "amount": 0.1
                            }
                        }
                    },
                    {
                        "name": "3 Cuotas",
                        "description": "3 Cuotas",
                        "count": 3,
                        "reference": "3",
                        "totals": {
                            "currency": {
                                "value": "ARS",
                                "label": "Peso Argentino",
                                "symbol": "$",
                                "hidden": false
                            },
                            "installment": {
                                "amount": 1.94,
                                "count": 3
                            },
                            "total": 5.83,
                            "financial": {
                                "percentage": 16.5,
                                "amount": 0.83
                            }
                        }
                    },
                    {
                        "name": "6 Cuotas",
                        "description": "6 Cuotas",
                        "count": 6,
                        "reference": "6",
                        "totals": {
                            "currency": {
                                "value": "ARS",
                                "label": "Peso Argentino",
                                "symbol": "$",
                                "hidden": false
                            },
                            "installment": {
                                "amount": 1.09,
                                "count": 6
                            },
                            "total": 6.55,
                            "financial": {
                                "percentage": 31,
                                "amount": 1.55
                            }
                        }
                    },
                    {
                        "name": "10 cuotas",
                        "description": "10 Cuotas",
                        "count": 10,
                        "reference": "10",
                        "totals": {
                            "currency": {
                                "value": "ARS",
                                "label": "Peso Argentino",
                                "symbol": "$",
                                "hidden": false
                            },
                            "installment": {
                                "amount": 0.51,
                                "count": 10
                            },
                            "total": 5.1,
                            "financial": {
                                "percentage": 2,
                                "amount": 0.1
                            }
                        }
                    },
                    {
                        "name": "Ahora 12",
                        "description": "",
                        "count": 12,
                        "reference": "ahora_12",
                        "totals": {
                            "currency": {
                                "value": "ARS",
                                "label": "Peso Argentino",
                                "symbol": "$",
                                "hidden": false
                            },
                            "installment": {
                                "amount": 0.43,
                                "count": 12
                            },
                            "total": 5.1,
                            "financial": {
                                "percentage": 2,
                                "amount": 0.1
                            }
                        }
                    },
                    {
                        "name": "Ahora 18",
                        "description": "",
                        "count": 18,
                        "reference": "ahora_18",
                        "totals": {
                            "currency": {
                                "value": "ARS",
                                "label": "Peso Argentino",
                                "symbol": "$",
                                "hidden": false
                            },
                            "installment": {
                                "amount": 0.28,
                                "count": 18
                            },
                            "total": 5.1,
                            "financial": {
                                "percentage": 2,
                                "amount": 0.1
                            }
                        }
                    }
                ]
            }
        ]
    }
}
```





```json
{
    "result": true,
    "data": {
        "id": "PYCNWIF9MSXV1QYLNG",
        "url": "https://local.mobbex.com:8080/p/checkout/v2/PYCNWIF9MSXV1QYLNG",
        "description": "Descripción de la Venta",
        "currency": "ARS",
        "total": 5,
        "created": 1598424066850,
        "customer": {
            "name": "Demo Mobbex"
        },
        "wallet": [
            {
                "it": "5ca170c7-b74a-469a-8e61-3635148cbc5d",
                "name": "Visa terminada en 8545",
                "source": {
                    "reference": "visa.comafi",
                    "name": "Visa Banco Comafi",
                    "shortName": "Visa Comafi",
                    "card": {
                        "currency": "ARS",
                        "product": {
                            "name": "Visa",
                            "shortName": "Visa",
                            "variant": "credit",
                            "lengths": [
                                16
                            ],
                            "gaps": [
                                4,
                                8,
                                12
                            ],
                            "code": {
                                "name": "CVV",
                                "length": 3,
                                "position": 1
                            },
                            "logo": "https://res.mobbex.com/images/sources/png/visa.png"
                        },
                        "issuer": {
                            "shortName": "Comafi",
                            "name": "Banco Comafi",
                            "color": "#789c48",
                            "logo": "https://res.mobbex.com/images/sources/png/comafi.png"
                        },
                        "level": "classic"
                    },
                    "type": "card",
                    "priority": 0
                },
                "card": {
                    "expiration_month": 2,
                    "expiration_year": 24,
                    "card_number": "402123******8888"
                },
                "installments": [
                    {
                        "name": "1 Pago",
                        "description": "1 Pago",
                        "count": 1,
                        "reference": "1",
                        "totals": {
                            "currency": {
                                "value": "ARS",
                                "label": "Peso Argentino",
                                "symbol": "$",
                                "hidden": false
                            },
                            "installment": {
                                "amount": 5.1,
                                "count": 1
                            },
                            "total": 5.1,
                            "financial": {
                                "percentage": 2,
                                "amount": 0.1
                            }
                        }
                    },
                    {
                        "name": "3 Cuotas",
                        "description": "3 Cuotas",
                        "count": 3,
                        "reference": "3",
                        "totals": {
                            "currency": {
                                "value": "ARS",
                                "label": "Peso Argentino",
                                "symbol": "$",
                                "hidden": false
                            },
                            "installment": {
                                "amount": 1.94,
                                "count": 3
                            },
                            "total": 5.83,
                            "financial": {
                                "percentage": 16.5,
                                "amount": 0.83
                            }
                        }
                    },
                    {
                        "name": "6 Cuotas",
                        "description": "6 Cuotas",
                        "count": 6,
                        "reference": "6",
                        "totals": {
                            "currency": {
                                "value": "ARS",
                                "label": "Peso Argentino",
                                "symbol": "$",
                                "hidden": false
                            },
                            "installment": {
                                "amount": 1.09,
                                "count": 6
                            },
                            "total": 6.55,
                            "financial": {
                                "percentage": 31,
                                "amount": 1.55
                            }
                        }
                    },
                    {
                        "name": "10 cuotas",
                        "description": "10 Cuotas",
                        "count": 10,
                        "reference": "10",
                        "totals": {
                            "currency": {
                                "value": "ARS",
                                "label": "Peso Argentino",
                                "symbol": "$",
                                "hidden": false
                            },
                            "installment": {
                                "amount": 0.51,
                                "count": 10
                            },
                            "total": 5.1,
                            "financial": {
                                "percentage": 2,
                                "amount": 0.1
                            }
                        }
                    },
                    {
                        "name": "Ahora 12",
                        "description": "",
                        "count": 12,
                        "reference": "ahora_12",
                        "totals": {
                            "currency": {
                                "value": "ARS",
                                "label": "Peso Argentino",
                                "symbol": "$",
                                "hidden": false
                            },
                            "installment": {
                                "amount": 0.43,
                                "count": 12
                            },
                            "total": 5.1,
                            "financial": {
                                "percentage": 2,
                                "amount": 0.1
                            }
                        }
                    },
                    {
                        "name": "Ahora 18",
                        "description": "",
                        "count": 18,
                        "reference": "ahora_18",
                        "totals": {
                            "currency": {
                                "value": "ARS",
                                "label": "Peso Argentino",
                                "symbol": "$",
                                "hidden": false
                            },
                            "installment": {
                                "amount": 0.28,
                                "count": 18
                            },
                            "total": 5.1,
                            "financial": {
                                "percentage": 2,
                                "amount": 0.1
                            }
                        }
                    }
                ]
            }
        ]
    }
}
```

# Procesamiento con Wallet via API



La metogología via API no valida riesgo ni corre el servicio Anti-Fraude. Para esto debe usarse el SDK.

```mermaid
sequenceDiagram;
    Sistema --> Mobbex: Crear Operacion;
    note right of Mobbex: Utilizar Private Key
    Sistema --> Mobbex: Generar Cobro;
    note right of Mobbex: Utilizar Public Key
```



1\) Generar un nuevo Checkout desde el lado Servidor utilizando Llave Privada.
2\) Obtener desde el Objeto wallet.it ( intent\_token ) y wallet.installments.reference
3\) Procesar la Operación como en el Punto 4. Se debe enviar securityCode como parametro adicional en Body.



POST: https\://api.mobbex.com/p/operations/&#x7B;&#x7B;intent\_token}}

### &#xA;Cabeceras:



api-key: Llave \*\*Pública\*\*

\#### Parámetros (Body):

\- \`\`\`installment\`\`\`: Reference Obtenido desde las cuotas calculadas para la tarjeta elegida en wallet.
\- \`\`\`securityCode\`\`\`: Código de Seguridad de la tarjeta elegida.

\#### Respuesta

Referencia: https\://mobbex.dev/docs/statuses


:::BlockQuote




\`\`\`json
\{
&#x20;   "id": "kS6D18unD",
&#x20;   "status": \{
&#x20;       "code": "200",
&#x20;       "text": "Aprobado",
&#x20;       "message": "Transacción Aprobada"
&#x20;   }
}
\`\`\`

\---

\# Uso del SDK

\> Tenga en cuenta que integrity ( SRI ) es obligatorio, de lo contrario sus credenciales pueden ser canceladas. &#x7B;.is-warning}

\---

\`\`\`html
\<!DOCTYPE html>
\<html lang="en">
&#x9;\<head>
&#x9;	\<meta charset="utf-8" />
&#x9;	\<meta
&#x9;		name="viewport"
&#x9;		content="width=device-width, initial-scale=1, shrink-to-fit=no"
&#x9;	/>
&#x9;	\<title>Mobbex SDK\</title>
&#x20;  &#x20;
&#x20;   \<script src="https\://res.mobbex.com/js/sdk/mobbex\@1.0.0.js" integrity="sha384-INuoL0CSX9x+vgy/B2db2lIABc/zHYHFP0KR8gma14xjQBwLBT5k5Xt9kIiXMrF2" crossorigin="anonymous">\</script>
&#x9;\</head>
&#x9;\<body>
&#x9;	\<noscript> You need to enable JavaScript to run this app. \</noscript>
&#x9;	\<div id="root">
&#x9;		\<ul>
&#x20;       \<li>Tarjeta 1\</li>
&#x20;     \</ul>

&#x20;     \<input
&#x9;				id="card\_security\_code"
&#x9;				type="password"
&#x9;				placeholder="Codigo de Seguridad"
&#x9;			/>
&#x20;    &#x20;
&#x9;		\<br />
&#x20;     \<!-- The button must not be in the FORM!! -->
&#x9;		\<button id="mobbex-pay" type="button">Pagar\</button>
&#x20;   \</div>
&#x9;	\<script>
&#x20;     document.getElementById("mobbex-pay").onclick = function() \{
&#x20;     	window\.MobbexJS.operation.process(\{
&#x9;				intentToken: "\{\{ intentToken }}",
&#x9;				installment: "\{\{ cuota elegida }}"&#x9;
&#x20;         securityCode: document.getElementById("card\_security\_code").value
&#x20;       });
&#x20;     };
&#x9;	\</script>
&#x9;\</body>
\</html>
\`\`\`
:::

