Tokenización de Tarjetas y Cuentas Bancarias - Wallet Transparent
Este módulo permite la implementación de la funcionalidad de Billetera Virtual o Wallet a través de API, permitiendo la tokenización de tarjetas y su posterior utilización para realizar cobros sin necesidad de que el cliente tenga que reingresar todos los datos de la tarjeta (a excepción del CVV o código de seguridad que siempre es requerido)
Administración de Clientes
- x-api-keystringrequiredDescription
- x-access-tokenstringrequiredDescription
- referencestringrequiredDescription
- customerObjectrequiredDescription
- customer.emailstringrequiredDescription
- customer.namestringrequiredDescription
- customer.identificationstringrequiredDescription
- testBooleanDescription
- featuresArrayDescription
curl --location --request POST 'https://api.mobbex.com/p/wallet' \
--header 'x-api-key: zJ8LFTBX6Ba8D611e9io13fDZAwj0QmKO1Hn1yIj' \
--header 'x-access-token: d31f0721-2f85-44e7-bcc6-15e19d1a53cc' \
--header 'Content-Type: application/json' \
--data-raw '{
"reference": "my_unique_reference",
"customer": {
"email": "[email protected]",
"name": "Cliente Demo",
"identification": "12123123"
},
"test": "true"
}'{
"result": true,
"data": {
"uid": "SEAW3SDTIF5E3OFHT",
"test": true,
"customerData": {
"identification": "12123123",
"email": "[email protected]",
"name": "Demo"
},
"status": "active",
"_id": "60a408e3d7816c3dd4ca5f3de",
"reference": "my_unique_reference",
"entity": "984660654629173000df9552",
"created": "2021-05-18T18:35:15.451Z",
"updated": "2021-05-18T18:35:15.459Z",
"sources": [],
"__v": 0
}
}{
}Ejemplos del nodo features:
- validate_id: Validate ID controlará el DNI del cliente contra el Tarjeta-Habiente, rechazando la operación en caso de no coincidir.
- accept_no_funds: Accept No Funds aceptará los casos donde la tarjeta no posea fondos como un caso válido de tokenización.
- customerUIDstringrequiredDescription
- x-api-keystringrequiredDescription
- x-access-tokenstringrequiredDescription
curl --location --request GET 'https://api.mobbex.com/p/wallet/SEAW3SDTIF5E3OFHT' \
--header 'x-api-key: zJ8LFTBX6Ba8D611e9io13fDZAwj0QmKO1Hn1yIj' \
--header 'x-access-token: d31f0721-2f85-44e7-bcc6-15e19d1a53cc'{
"result": true,
"data": {
"_id": "60a40c08d7816c3dd4ca5f41",
"uid": "SEAW3SDTIF5E3OFHT",
"test": true,
"customerData": {
"identification": "12123123",
"email": "[email protected]",
"name": "Demo"
},
"status": "active",
"reference": "my_unique_reference",
"entity": {
"_id": "984660654629173000df9552",
"name": "Demo Entity",
"uid": "H1rJEXyr",
"description": "",
"logo": {
"filename": "car.jpg",
"url": "https://s3.amazonaws.com/mobbex/files/images/34cfcef0-fd4c-42f5-8bce-0c6f57e68035.jpg",
"mimetype": "image/jpeg",
"extension": "jpg",
"size": 10490,
"width": 170,
"height": 170,
"sizes": [
"medium",
"small",
"square"
],
"versions": [
"https://s3.amazonaws.com/mobbex/files/images/34cfcef0-fd4c-42f5-8bce-0c6f57e68035-medium.jpg",
"https://s3.amazonaws.com/mobbex/files/images/34cfcef0-fd4c-42f5-8bce-0c6f57e68035-small.jpg",
"https://s3.amazonaws.com/mobbex/files/images/34cfcef0-fd4c-42f5-8bce-0c6f57e68035-square.jpg"
]
},
"tax_id": "99999999999",
"countryReference": "ARG"
},
"created": "2021-05-18T18:48:40.555Z",
"updated": "2021-05-18T18:48:40.557Z",
"sources": [
{
"uid": "7IG1F2KOJF4IELRL5W",
"name": "Visa Débito terminada en 0010",
"cardNumber": "450799******0010",
"priority": "primary"
}
],
"__v": 0
}
}{
"message": "Ain't no cake like that."
}- customerUIDstringrequiredDescription
- x-api-keystringrequiredDescription
- x-access-tokenstringrequiredDescription
- referencestringDescription
- customerObjectDescription
- customer.emailstringrequiredDescription
- customer.identificationstringrequiredDescription
- customer.namestringrequiredDescription
- testBooleanDescription
curl --location --request POST 'https://api.mobbex.com/p/wallet/SEAW3SDTIF5E3OFHT/action/edit' \
--header 'x-api-key: zJ8LFTBX6Ba8D611e9io13fDZAwj0QmKO1Hn1yIj' \
--header 'x-access-token: d31f0721-2f85-44e7-bcc6-15e19d1a53cc' \
--header 'Content-Type: application/json' \
--data-raw '{
"reference": "my_new_unique_reference",
"customer": {
"email": "[email protected]",
"name": "Cliente Demo",
"identification": "12123123"
},
"test": "false"
}'var myHeaders = new Headers();
myHeaders.append("x-api-key", "zJ8LFTBX6Ba8D611e9io13fDZAwj0QmKO1Hn1yIj");
myHeaders.append("x-access-token", "d31f0721-2f85-44e7-bcc6-15e19d1a53cc");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"reference": "my_new_unique_reference",
"customer": {
"email": "[email protected]",
"name": "Cliente Demo",
"identification": "12123123"
},
"test": "false"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.mobbex.com/p/wallet/SEAW3SDTIF5E3OFHT/action/edit", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));{
"result": true,
"data": {}
}{
"message": "Ain't no cake like that."
}- customerUIDstringrequiredDescription
- x-api-keystringrequiredDescription
- x-access-tokenstringrequiredDescription
curl --location --request DELETE 'https://api.mobbex.com/p/wallet/SEAW3SDTIF5E3OFHT/action/delete' \
--header 'x-api-key: zJ8LFTBX6Ba8D611e9io13fDZAwj0QmKO1Hn1yIj' \
--header 'x-access-token: d31f0721-2f85-44e7-bcc6-15e19d1a53cc'{
"result": true,
"data": {}
}{
"message": "Ain't no cake like that."
}Administración de Medios de Pago
Información Importante
Para utilizar cualquiera de los métodos descriptos a continuación e ingresar los datos de los medios de pago a través de API, por favor contacta a [email protected] e indica los accesos que necesitas. Además, el sitio debe cumplir con una serie de requisitos, incluyendo las normas PCI DSS.
Ingresar los datos vía API
- api-keystringrequiredDescription
- sourceObjectrequiredDescription
- cardObjectDescription
- numberstringrequiredDescription
- monthstringrequiredDescription
- yearstringrequiredDescription
- identificationstringDescription
- namestringrequiredDescription
- securityCodestringDescription
- bankObjectDescription
- cbustringDescription
- cvustringDescription
- aliasstringDescription
- identificationstringDescription
- testBooleanDescription
- validateBooleanDescription
curl --location --request POST 'https://api.mobbex.com/p/sources/token' \
--header 'api-key: 6Icjn_XjdKf51ZS71234K506bPRha_nSVvwS' \
--header 'Content-Type: application/json' \
--data-raw '{
"source": {
"card": {
"number": "4507990000000010",
"month": "12",
"year": "34",
"identification": "12123123",
"name": "Cliente Demo"
}
}
}'var data = JSON.stringify({
"source": {
"card": {
"number": "4507990000000010",
"month": 12,
"year": 34,
"identification": "12123123",
"name": "Cliente Demo"
}
}
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function() {
if(this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://api.mobbex.com/p/sources/token");
xhr.setRequestHeader("api-key", "6Icjn_XjdKf51ZS71234K506bPRha_nSVvwS");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.send(data);{
"result": true,
"data": {
"token": "T:Y_50ND1cD",
"description": "Visa Débito terminada en 0010",
"source": {
"references": [
"visa.debit"
],
"reference": "visa.debit",
"generic": "visa.debit",
"compatReference": "visa.debit",
"name": "Visa Débito",
"shortName": "Visa Débito",
"currency": "ARS",
"card": {
"level": "classic",
"product": {
"name": "Visa Débito",
"shortName": "Visa Débit",
"variant": "debit",
"lengths": [
16
],
"gaps": [
4,
8,
12
],
"code": {
"name": "CVV",
"length": 3,
"position": 1
},
"logo": "https://res.mobbex.com/images/sources/png/visa.png",
"validation": [
"length",
"exp",
"cvv",
"luhn"
]
},
"issuer": {
"shortName": "Visa",
"name": "Visa",
"color": "#122d98",
"type": "unknown",
"logo": "https://res.mobbex.com/images/sources/png/visa.png"
}
},
"type": "card",
"priority": 0
},
"isValid": true
}
}{
"message": "Ain't no cake like that."
}Medio de pago válido
Un medio de pago es válido al crear su token únicamente si la propiedad "isValid" retornada en la respuesta es verdadera. En caso contrario, el medio de pago no es válido.
- customerUIDstringrequiredDescription
- x-api-keystringrequiredDescription
- x-access-tokenstringrequiredDescription
- tokenstringrequiredDescription
- prioritystringDescription
curl --location --request POST 'https://api.mobbex.com/p/wallet/SEAW3SDTIF5E3OFHT/source' \
--header 'x-api-key: zJ8LFTBX6Ba8D611e9io13fDZAwj0QmKO1Hn1yIj' \
--header 'x-access-token: d31f0721-2f85-44e7-bcc6-15e19d1a53cc' \
--header 'Content-Type: application/json' \
--data-raw '{
"token": "T:Y_50ND1cD",
"priority": "primary"
}'var data = JSON.stringify({
"token": "T:Y_50ND1cD",
"priority": "primary"
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function() {
if(this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://api.mobbex.com/p/wallet/SEAW3SDTIF5E3OFHT/source");
xhr.setRequestHeader("x-api-key", "zJ8LFTBX6Ba8D611e9io13fDZAwj0QmKO1Hn1yIj");
xhr.setRequestHeader("x-access-token", "d31f0721-2f85-44e7-bcc6-15e19d1a53cc");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.send(data);{
"result": true,
"data": {
"status": "success",
"code": "200",
"text": "El método de pago se agregó exitosamente.",
"sourceUid": "YBATG1W8SO3SGHMZT"
"operation": {
"view": "result",
"options": {},
"id": "rj_4H4Ohc",
"status": {
"code": "200",
"text": "Aprobado",
"message": "Transacción Aprobada"
},
"total": 13.15,
"currency": {
"value": "TEST",
"label": "Test Money",
"symbol": "T$",
"hidden": false
},
"data": [],
"actions": []
}
}
}{
"message": "Ain't no cake like that."
}
- customerUIDstringrequiredDescription
- sourceUIDstringrequiredDescription
- x-api-keystringrequiredDescription
- x-access-tokenstringrequiredDescription
- prioritystringDescription
curl --location --request POST 'https://api.mobbex.com/p/wallet/SEAW3SDTIF5E3OFHT/source/YBATG1W8SO3SGHMZT/action/edit' \
--header 'x-api-key: zJ8LFTBX6Ba8D611e9io13fDZAwj0QmKO1Hn1yIj' \
--header 'x-access-token: d31f0721-2f85-44e7-bcc6-15e19d1a53cc' \
--header 'Content-Type: application/json' \
--data-raw '{
"priority": "secondary"
}'var data = JSON.stringify({
"priority": "secondary"
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function() {
if(this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://api.mobbex.com/p/wallet/SEAW3SDTIF5E3OFHT/source/YBATG1W8SO3SGHMZT/action/edit");
xhr.setRequestHeader("x-api-key", "zJ8LFTBX6Ba8D611e9io13fDZAwj0QmKO1Hn1yIj");
xhr.setRequestHeader("x-access-token", "d31f0721-2f85-44e7-bcc6-15e19d1a53cc");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.send(data);{
"result": true,
"data": {}
}- customerUIDstringrequiredDescription
- sourceUIDstringrequiredDescription
- x-api-keystringrequiredDescription
- x-access-tokenstringrequiredDescription
curl --location --request DELETE 'https://api.mobbex.com/p/wallet/SEAW3SDTIF5E3OFHT/source/YBATG1W8SO3SGHMZT/action/delete' \
--header 'x-api-key: zJ8LFTBX6Ba8D611e9io13fDZAwj0QmKO1Hn1yIj' \
--header 'x-access-token: d31f0721-2f85-44e7-bcc6-15e19d1a53cc'var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function() {
if(this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("DELETE", "https://api.mobbex.com/p/wallet/SEAW3SDTIF5E3OFHT/source/YBATG1W8SO3SGHMZT/action/delete");
xhr.setRequestHeader("x-api-key", "zJ8LFTBX6Ba8D611e9io13fDZAwj0QmKO1Hn1yIj");
xhr.setRequestHeader("x-access-token", "d31f0721-2f85-44e7-bcc6-15e19d1a53cc");
xhr.send();{
"result": true,
"data": {}
}Procesamiento de Operaciones
A partir de un cliente y un medio de pago, podemos generar una operación utilizando la siguiente API:
- customerUIDstringrequiredDescription
- x-api-keystringrequiredDescription
- x-access-tokenstringrequiredDescription
- sourcestringrequiredDescription
- referencestringrequiredDescription
- testBooleanDescription
- totalNumberrequiredDescription
- intentstringDescription
- splitArrayDescription
- descriptionstringDescription
- currencystringDescription
- installmentstringDescription
- webhookstringDescription
- securityCodestringDescription
curl --location --request POST 'https://api.mobbex.com/p/wallet/SEAW3SDTIF5E3OFHT/operation' \
--header 'x-api-key: zJ8LFTBX6Ba8D611e9io13fDZAwj0QmKO1Hn1yIj' \
--header 'x-access-token: d31f0721-2f85-44e7-bcc6-15e19d1a53cc' \
--header 'Content-Type: application/json' \
--data-raw '{
"source": "YBATG1W8SO3SGHMZT",
"total": 100.50,
"reference": "202105271429",
"webhook": "https://mobbex.com/process/webhook",
"securityCode": "200",
"test": true
}'var data = JSON.stringify({
"source": "YBATG1W8SO3SGHMZT",
"total": 100.5,
"reference": "202105271429",
"webhook": "https://mobbex.com/process/webhook",
"securityCode": "200",
"test": true
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function() {
if(this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://api.mobbex.com/p/wallet/SEAW3SDTIF5E3OFHT/operation");
xhr.setRequestHeader("x-api-key", "zJ8LFTBX6Ba8D611e9io13fDZAwj0QmKO1Hn1yIj");
xhr.setRequestHeader("x-access-token", "d31f0721-2f85-44e7-bcc6-15e19d1a53cc");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.send(data);{
"result": true,
"data": {
"result": true,
"view": {
"type": "card"
},
"payment": {
"id": "XrJzmlavI",
"description": "Test Payment",
"operation": {
"type": "payment.v2"
},
"status": {
"code": "200",
"text": "Aprobado",
"message": "Transacción Aprobada"
},
"total": 100,
"currency": {
"code": "TEST",
"text": "Test Money",
"symbol": "T$"
},
"riskAnalysis": {
"band": "N/A",
"level": "N/A"
},
"created": "2021-05-18T18:58:51.882Z",
"updated": "2021-05-18T18:58:52.019Z",
"reference": "202105271429",
"source": {
"name": "Visa Débito",
"type": "card",
"reference": "visa.debit",
"number": "450799******0010",
"cardholder": {
"name": "Demo",
"identification": "12123123"
},
"expiration": {
"month": "12",
"year": "34"
},
"installment": {
"description": "1",
"amount": 0,
"count": 1,
"reference": ""
}
}
},
"user": {
"name": "Demo",
"email": "[email protected]"
},
"source": {
"name": "Visa Débito",
"type": "card",
"reference": "visa.debit"
}
}
}