Métodos de Pago y Cuotas
Listados de Medios de Pago
Listar medios de pago con API-Keys
GET
https://api.bdp.gire.com/p/sources?total={total}
Query Parameters
- totalstringrequiredDescription
- sources[]ArrayDescription
- installments[]ArrayDescription
- intentstringDescription
- contextstringDescription
Header Parameters
- x-api-keystringrequiredDescription
- x-access-tokenstringrequiredDescription
javascript
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function() {
if(this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://api.bdp.gire.com/p/sources?total=100");
xhr.setRequestHeader("x-api-key", "zJ8LFTBX6Ba8D611e9io13fDZAwj0QmKO1Hn1yIj");
xhr.setRequestHeader("x-access-token", "d31f0721-2f85-44e7-bcc6-15e19d1a53cc");
xhr.send();php
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.bdp.gire.com/p/sources?total=100',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'x-api-key: zJ8LFTBX6Ba8D611e9io13fDZAwj0QmKO1Hn1yIj',
'x-access-token: d31f0721-2f85-44e7-bcc6-15e19d1a53cc'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
200
{
"result": true,
"data": [
{
"installments": {
"enabled": true,
"list": []
},
"view": {
"group": "card",
"subgroup_title": "Tarjeta de Crédito/Débito",
"subgroup_logo": "https://res.gire.com/images/icons/card.png",
"type": "card",
"subgroup_priority": 99
},
"source": {
"reference": "visa.naranja",
"name": "Visa Tarjeta Naranja"
}
},
{
"installments": {
"enabled": false
},
"view": {
"group": "cash",
"subgroup_title": "Efectivo",
"subgroup_logo": "https://res.gire.com/images/icons/cash.png",
"type": "selector",
"subgroup_priority": 99
},
"source": {
"reference": "arg.pagofacil",
"name": "PagoFacil"
}
},
{
"installments": {
"enabled": true,
"list": [
{
"name": "1 cuota",
"description": "",
"count": 1,
"reference": "1",
"uid": "65Am_YYqo",
"totals": {
"currency": {
"value": "ARS",
"label": "Peso Argentino",
"symbol": "$",
"hidden": false
},
"installment": {
"amount": 100,
"count": 1
},
"total": 100,
"financial": {
"percentage": 0,
"amount": 0
}
}
},
{
"name": "Ahora 3",
"description": "",
"count": 3,
"reference": "ahora_3",
"uid": "FiRS7rm_z",
"totals": {
"currency": {
"value": "ARS",
"label": "Peso Argentino",
"symbol": "$",
"hidden": false
},
"installment": {
"amount": 33.33,
"count": 3
},
"total": 100,
"financial": {
"percentage": 0,
"amount": 0
}
}
}
},
"view": {
"group": "card",
"subgroup_title": "Tarjeta de Crédito/Débito",
"subgroup_logo": "https://res.gire.com/images/icons/card.png",
"type": "card",
"subgroup_priority": 99
},
"source": {
"reference": "visa",
"name": "Visa"
}
}
]
}Formato de Respuesta en cada solicitud
- result: Resultado de la operación
- data: Array de datos de la operación.
Data
- source: Posee los datos del medio de pago: nombre y referencia
- view: Posee el tipo de Medio de Pago
- installments: Nodo Opcional y sólo disponible en métodos de pago que poseen Cuotas. Array de Cuotas. Si el método posee cuotas encontrará un nodo "list"
Installments -> List
- count: Cantidad real de Cuotas, es el divisor del monto total
- name: Nombre del sistema de cuotas
- description: Descripción opcional del sistema de cuotas.
- totals: Nodo donde se indican los recargos, descuentos y cuotas
{
"totals": {
"currency": {
"value": "ARS",
"label": "Peso Argentino",
"symbol": "$",
"hidden": false
},
"installment": {
"amount": 12500,
"count": 1
},
"total": 12500,
"financial": {
"percentage": 0,
"amount": 0
}
}
}
Obtener planes con Reglas Avanzadas
GET
https://api.bdp.gire.com/p/sources/rules/{rule}/installments
Query Parameters
- rulestringrequiredDescription
Header Parameters
- x-api-keystringrequiredDescription
- x-access-tokenstringrequiredDescription
javascript
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function() {
if(this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://api.bdp.gire.com/p/sources/rules/externalMatch/installments");
xhr.setRequestHeader("x-api-key", "zJ8LFTBX6Ba8D611e9io13fDZAwj0QmKO1Hn1yIj");
xhr.setRequestHeader("x-access-token", "d31f0721-2f85-44e7-bcc6-15e19d1a53cc");
xhr.send();php
200
{
"result": true,
"data": [
{
"sourceReference": "visa",
"installments": [
{
"name": "12 cuotas",
"description": "+10% de Descuento.",
"uid": "kCbnpZB7B"
}
],
"uid": "6CPxGdioK",
"source": {
"reference": "visa",
"name": "Visa",
"shortName": "Visa"
}
}
]
}