Flujo de Pago - CIMPRA 535 ( ARG )
5 min
Este flujo es exclusivo para Cuenta/Billetera Habientes
sequenceDiagram
participant Aplicacion
participant Servicio
participant Interoperable
Aplicacion->>Servicio: Lee un QR
Servicio->>Interoperable: Envía el QR al endpoint "resolve"
Interoperable-->>Aplicacion: Devuelve la Orden
Servicio->>Interoperable: Llamada a Patch Plans
Interoperable-->>Aplicacion: Devuelve los Planes Calculados
Aplicacion->>Servicio: Elije Medio de Pago
Servicio->>Interoperable: Crea el Token de la Tarjeta a utilizar
Servicio->>Interoperable: Ejecuta el Pago
Interoperable-->>Aplicacion: Devuelve el resultado del Pago
Esta especificación está diseñada sólo para Argentina en base al documento CIMPRA 535. Para utilizar la API genérica, completa y múlti-país dirigirse a "Flujo de Pago"
Leer/Resolver QR SIN Cuenta/Billetera-Habiente
Este endpoint permite leer el QR
POST
https://api.interoperable.ar/qr/resolve?loc=ARG
Query Parameters
- locstringDescription
Header Parameters
- Authorizationstringrequired
Body Parameters
- qr_rawstringrequiredDescription
- fieldsObject
- posReferencestringDescription
- walletIdstringDescription
curl
curl --location 'https://api.interoperable.ar/qr/resolve' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"qr_raw":"string"}'nodejs
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://api.interoperable.ar/qr/resolve',
'headers': {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"qr_raw": "string"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
javascript
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"qr_raw": "string"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.interoperable.ar/qr/resolve", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));python
import requests
import json
url = "https://api.interoperable.ar/qr/resolve"
payload = json.dumps({
"qr_raw": "string"
})
headers = {
'Accept': 'application/json',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.interoperable.ar/qr/resolve")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = "application/json"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"qr_raw": "string"
})
response = https.request(request)
puts response.read_body
200
{
"additional_info": {},
"amount": {
"currency": "TEST",
"value": 999
},
"merchant": {
"account": {
"cvu": "XXXXXXXXXXXXXXXXX"
},
"category": "SMALL",
"cuit": "20121231234",
"field_of_activity": "7399",
"free_tier": true,
"image": "https://res.mobbex.com/images/icons/def_store.png",
"iva_exempt": true,
"mcc": "7399",
"name": "Prueba 2",
"zip": "C1000AAA"
},
"order": {
"id": "88XI8ZA3FDRUL2P1RI88A7",
"items": {
"currency_id": "TEST",
"description": "Compra en Prueba 2",
"quantity": 1,
"title": "Compra en Prueba 2",
"unit_price": 999
},
"total_amount": 999
},
"payment_methods_allowed": [
{
"id": "CARD"
}
],
"qr_id": "88XI8ZA3FDRUL2P1RI88A7"
}500
{
"code": "500",
"message": "FAT_ERR"
}Patch Plans
PATCH
https://api.interoperable.ar/qr/{order_id}/plans?loc=ARG
Path Parameters
- order_idstringrequiredDescription
Query Parameters
- locstringDescription
Header Parameters
- Authorizationstringrequired
curl
curl --location --globoff --request PATCH 'https://api.interoperable.ar/qr/{order_id}/plans/{order_id}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json'nodejs
var request = require('request');
var options = {
'method': 'PATCH',
'url': 'https://api.interoperable.ar/qr/{order_id}/plans/{order_id}',
'headers': {
'Accept': 'application/json',
'Content-Type': 'application/json'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
javascript
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Content-Type", "application/json");
var requestOptions = {
method: 'PATCH',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.interoperable.ar/qr/{order_id}/plans/{order_id}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));python
import requests
import json
url = "https://api.interoperable.ar/qr/{order_id}/plans/{order_id}"
payload = {}
headers = {
'Accept': 'application/json',
'Content-Type': 'application/json'
}
response = requests.request("PATCH", url, headers=headers, data=payload)
print(response.text)
ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.interoperable.ar/qr/{order_id}/plans/{order_id}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Accept"] = "application/json"
request["Content-Type"] = "application/json"
response = https.request(request)
puts response.read_body
200
{
"additional_info": {},
"supported_bins": [
{
"brand_id": "",
"type": "debit",
"original_bins": [
"45079900"
],
"plans": [
{
"id": "bqRTPg~KC",
"type": "ADQUIRENTE",
"description": "Débito",
"installments": 1,
"total_amount": {
"value": 10,
"currency": "ARS"
},
"installment_amount": {
"value": 10,
"currency": "ARS"
},
"financial_info": {
"total_fianancial_cost": "0.00",
"nominal_annual_rate": "0.00"
},
"requiered_fields": [
"payment_method.card.holder.name",
"payment_method.card.holder.identification_number"
]
}
]
}
],
"unsupported_bins": [
"44456098"
]
}500
{
"result": false,
}
Crear Token
Pagar Orden via QR
POST
https://api.interoperable.ar/payments/tokens?loc=ARG
Header Parameters
- AuthorizationstringrequiredDescription
Body Parameters
- cardObjectrequiredDescription
- walletObject
- brand_wallet_idstringDescription
curl
curl --location 'https://api.interoperable.ar/payments/tokens' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"card":"Object"}'nodejs
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://api.interoperable.ar/payments/tokens',
'headers': {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"card": "Object"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
javascript
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"card": "Object"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.interoperable.ar/payments/tokens", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));python
import requests
import json
url = "https://api.interoperable.ar/payments/tokens"
payload = json.dumps({
"card": "Object"
})
headers = {
'Accept': 'application/json',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.interoperable.ar/payments/tokens")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = "application/json"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"card": "Object"
})
response = https.request(request)
puts response.read_body
200
{
"created_at": "2024-03-04T10:44:49Z",
"expiry_at": "2024-03-04T10:59:49Z",
"token": "T:P0WG66KQ9WRPQQ9EETIECJ"
}404
{
"message": "Ain't no cake like that."
}Ejemplo de Solicitud de Creación de Token
{
"card": {
"holder": {
"name": "Demo",
"identification_type": "DNI",
"identification_number": "12123123"
},
"card_data": {
"number": "4507990000000010",
"security_code": "200",
"expiration_month": 12,
"expiration_year": 2032,
"entry_mode": "MANUAL"
}
}
}Pagar QR
Pagar Orden via QR
POST
https://api.interoperable.ar/orders/{order_id}/payments?loc=ARG
Path Parameters
- order_idstringrequiredDescription
Query Parameters
- locstringDescription
Header Parameters
- AuthorizationstringrequiredDescription
Body Parameters
- sourcestringrequiredDescription
- installmentstringrequiredDescription
curl
curl --location --globoff 'https://api.interoperable.ar/orders/{order_id}/payments/{order_id}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"source":"string","installment":"string"}'nodejs
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://api.interoperable.ar/orders/{order_id}/payments/{order_id}',
'headers': {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"source": "string",
"installment": "string"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
javascript
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"source": "string",
"installment": "string"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.interoperable.ar/orders/{order_id}/payments/{order_id}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));python
import requests
import json
url = "https://api.interoperable.ar/orders/{order_id}/payments/{order_id}"
payload = json.dumps({
"source": "string",
"installment": "string"
})
headers = {
'Accept': 'application/json',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.interoperable.ar/orders/{order_id}/payments/{order_id}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = "application/json"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"source": "string",
"installment": "string"
})
response = https.request(request)
puts response.read_body
200
{
"payment_id": "TAV44OX7UQHYHLLEOANULX",
"order_id": "F63KHXZT3ALIB1LT0I4NTO",
"status": "APPROVED",
"status_code": "approved",
"amount": {
"value": 10,
"currency": "ARS"
},
"authorized_amount": {
"value": 10,
"currency": "ARS"
},
"plan": {
"id": "jK55pyDcz",
"type": "ADQUIRENTE",
"description": "1 Cuota",
"installments": 1,
"total_amount": {
"value": 10,
"currency": "ARS"
},
"installment_amount": {
"value": 10,
"currency": "ARS"
},
"financial_info": {
"total_fianancial_cost": "0.00",
"nominal_annual_rate": "0.00"
}
},
"card": {
"original_bin": "53236299",
"original_last4": "1008",
"type": "card",
"brand_id": "Mastercard",
"issuer_id": "",
"holder": {
"name": "Demo",
"identification_type": "DNI",
"identification_number": "12123123"
}
},
"wallet": {
"brand_wallet_id": "20121231234",
"name": "prueba wallet",
"provider": "string",
"user": {
"device_id": "12123123",
"email": "[email protected]",
"identification_number": "12123123",
"identification_type": "DNI",
"phone": "12123123"
}
},
"authorization_code": "594461",
"refunds": [],
"created_at": "2024-02-26T00:28:09.716Z",
"updated_at": "2024-02-26T00:28:10.726Z",
"additional_info": {}
}404
{
"message": "Ain't no cake like that."
}Ejemplo de Solicitud de Pago
{
"plan": {
"id": "bqRTPg~KC",
"type": "ADQUIRENTE",
"description": "Débito",
"installments": 1,
"total_amount": {
"value": 10,
"currency": "ARS"
},
"installment_amount": {
"value": 10,
"currency": "ARS"
}
},
"payment_method": {
"card": {
"acceptor_token": "T:8F2X2TWOUFKOZTAX0VP0C5"
},
"wallet": {
"name": "string",
"provider": "string",
"brand_wallet_id": "string",
"user": {
"email": "[email protected]",
"phone": "string",
"device_id": "string",
"identification_type": "DNI",
"identification_number": "string"
}
}
},
"additional_info": {}
}Respuesta con Localización Argentina
{
"payment_id": "VOBHX6H0O3BXS7KSY8Z1FK",
"order_id": "9ZTD998UVUHRUQFQJVSFB3",
"status": "APPROVED",
"status_code": "APPROVED",
"amount": {
"value": 10,
"currency": "ARS"
},
"authorized_amount": {
"value": 10,
"currency": "ARS"
},
"plan": {
"id": "bqRTPg~KC",
"type": "ADQUIRENTE",
"description": "Débito",
"installments": 1,
"total_amount": {
"value": 10,
"currency": "ARS"
},
"installment_amount": {
"value": 10,
"currency": "ARS"
},
"financial_info": {
"total_fianancial_cost": "00.00",
"nominal_annual_rate": "00.00"
}
},
"card": {
"original_bin": "45079900",
"original_last4": "0010",
"type": "DEBITO",
"brand_id": "",
"issuer_id": "",
"holder": {
"name": "Demo",
"identification_type": "DNI",
"identification_number": "12123123"
}
},
"wallet": {
"name": "string",
"provider": "string",
"brand_wallet_id": "string",
"user": {
"email": "[email protected]",
"phone": "string",
"device_id": "string",
"identification_type": "DNI",
"identification_number": "string"
}
},
"authorization_code": "11111111",
"refunds": [],
"created_at": "2023-10-26T17:26:03.953Z",
"updated_at": "2023-10-26T17:26:03.953Z",
"additional_info": {}
}Devolver Operación
Devolución de la Orden
DELETE
https://api.interoperable.ar/orders/{order_id}/payments?loc=ARG
Path Parameters
- order_idstringrequiredDescription
Header Parameters
- Authorizationstring
curl
curl --location --globoff --request DELETE 'https://api.interoperable.ar/orders/{order_id}/payments/{order_id}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json'nodejs
var request = require('request');
var options = {
'method': 'DELETE',
'url': 'https://api.interoperable.ar/orders/{order_id}/payments/{order_id}',
'headers': {
'Accept': 'application/json',
'Content-Type': 'application/json'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
javascript
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Content-Type", "application/json");
var requestOptions = {
method: 'DELETE',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.interoperable.ar/orders/{order_id}/payments/{order_id}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));python
import requests
import json
url = "https://api.interoperable.ar/orders/{order_id}/payments/{order_id}"
payload = {}
headers = {
'Accept': 'application/json',
'Content-Type': 'application/json'
}
response = requests.request("DELETE", url, headers=headers, data=payload)
print(response.text)
ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.interoperable.ar/orders/{order_id}/payments/{order_id}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Accept"] = "application/json"
request["Content-Type"] = "application/json"
response = https.request(request)
puts response.read_body
200
{
"transaction_id": "1CGEMKERVARWBKE49EBRE9"
}403