Introduction

Utiliza nuetra API para procesar pagos de forma segura

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {PERSONAL_ACCESS_TOKEN}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

Generales

Obtener token de autenticación

POST
https://production.b2pagos.com
/api/v1/get-access-token

Este endpoint permite generar un token de acceso para autenticar al usuario y poder realizar otras solicitudes al API

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example response:
{
    "success": true,
    "data": "43|Twf760yNIOzPwU5TOsxqHg8dV6XsaOMkkRaeea8f",
    "message": ""
}
{
    "success": false,
    "message": "Invalid credentials"
}

Obtener listado de cuentas

GET
https://production.b2pagos.com
/api/v1/accounts
requires authentication

Este endpoint devuelve el listado de cuentas relacionado al usuario que realiza la solicitud

Headers

Authorization
Example:
Bearer {PERSONAL_ACCESS_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
Example response:
{
"success": true,
"data": [
    {
        "id": 2,
        "platform": "DEVELOPMENT",
        "banks_account_number": "13616635935",
        "rsa_public_key": "-----BEGIN PUBLIC KEY-----
MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAsufUhXQlalV0swvLo8nM
uZ3Poe3GZU+73+hbwVst+9C02Eu31JmPRXdCdDPsOtzJtxPC7xazlvT1+cVEOHNE
UEvtirJE7tim6SIJIAqHpdAEdnvdwYLSADJ836ZSwFZMwqbySDgcjm5543E9rAQ/
kg8z8uotIcJaWZl/PYkE0CePVAW4+nkqogaDb/aL6CaaNWzO5/PHejUfHsaHx9rP
86AvSOPlNCI0noBcdUzpT4pgcuRJocf66eB9gBRTTh8EeU4oPpHD3QAfpBu68n7H
xOPOATYxKyuHGrZAVFRsiLoLZDhRqM3W6ZiVz8Z6v+J08ebVjnHB97f2793NX9JD
qxjoaNh4vNbSQpavHdZqzme6lJtYtCWaBdutn2p97zkNoeN2HjvpaYmqIqEHy1LJ
gUh4VdC3+sxC8gY9uByJCss5UzU2jt5c6Ppm42ztVlrTLX/Rg9N7sDnPw3YRTZfb
IUaqKZtEwIGJ3Nt25RZr/qiavV6R8EgQoE+t+CxXwtthBNhw5nUrCWVWpXqylV5W
0o4rekq3cVmqxfomQXOusDcleoWppTDxuO00QmgTkebwB6b8ZirMf6ss5XJv273Y
nUBFzoz5kOt0JCsC4muwx0SPp0V0SwVOt8+UsTP/E2Gf7kLxeYyTg1uy36ZFczh4
zVk/Y+BEX6p7ODYEolV1yVkCAwEAAQ==
-----END PUBLIC KEY-----
"
    }
],
"message": ""
}
{
    "message": "Unauthenticated."
}

Obtener metodos de pago de una cuenta

POST
https://production.b2pagos.com
/api/v1/accounts/paymentmethods
requires authentication

Este endpoint devuelve el listado de métodos de pago de una cuenta

Headers

Authorization
Example:
Bearer {PERSONAL_ACCESS_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example response:
{
    "success": true,
    "data": [
        "TC",
        "PSE",
        "WALLETVISA"
    ],
    "message": ""
}
{
    "success": false,
    "data": null,
    "message": "No se ha especificado un id de cuenta válido"
}
{
    "message": "Unauthenticated."
}
{
    "success": false,
    "data": "1",
    "message": "El usuario que está autenticado no tiene acceso a la cuenta seleccionada"
}

Obtener monedas disponibles

GET
https://production.b2pagos.com
/api/v1/currencies
requires authentication

Este endpoint devuelve el listado de monedas disponibles

Headers

Authorization
Example:
Bearer {PERSONAL_ACCESS_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
Example response:
{
    "success": true,
    "data": [
        {
            "iso_code": "COP",
            "symbol": "$",
            "decimal_separator": ",",
            "thousand_separator": "."
        }
    ],
    "message": ""
}
{
    "message": "Unauthenticated."
}

Obtener los impuestos disponibles

GET
https://production.b2pagos.com
/api/v1/taxes
requires authentication

Este endpoint devuelve el listado de impuestos disponibles

Headers

Authorization
Example:
Bearer {PERSONAL_ACCESS_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
Example response:
{
    "success": true,
    "data": [
        {
            "type": "IVA",
            "value": "0.00"
        },
        {
            "type": "IVA",
            "value": "5.00"
        },
        {
            "type": "IVA",
            "value": "19.00"
        }
    ],
    "message": ""
}
{
    "message": "Unauthenticated."
}

Obtener paises

GET
https://production.b2pagos.com
/api/v1/countries
requires authentication

Este endpoint devuelve el listado de paises disponibles

Headers

Authorization
Example:
Bearer {PERSONAL_ACCESS_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
Example response:
{
    "success": true,
    "data": [
        {
            "id": 1,
            "name": "Colombia",
            "code_country": 57
        }
    ],
    "message": ""
}
{
    "message": "Unauthenticated."
}

Obtener regiones

GET
https://production.b2pagos.com
/api/v1/regions/{countryId?}
requires authentication

Este endpoint devuelve el listado de regiones disponibles

Headers

Authorization
Example:
Bearer {PERSONAL_ACCESS_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

countryId
integer

Id del país del que se desean obtener las regiones Debe ser un valor devuelto por el endpoint Obtener paises

Example:
48
Example response:
{
    "success": true,
    "data": [
        {
            "id": 1,
            "name": "Antioquia",
            "code": "ANT",
            "country_id": 48,
            "country_name": "Colombia",
            "country_code": "CO",
        }

        {
            "id": 2,
            "name": "Cundinamarca",
            "code": "CUN",
            "country_id": 48,
            "country_name": "Colombia",
            "country_code": "CO",
        }
    ],
    "message": ""
}
{
    "message": "Unauthenticated."
}

Obtener ciudades

GET
https://production.b2pagos.com
/api/v1/cities/{countryId?}/{regionId?}
requires authentication

Este endpoint devuelve el listado de ciudades disponibles

Headers

Authorization
Example:
Bearer {PERSONAL_ACCESS_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

countryId
integer

Id del país del que se desean obtener las ciudades Debe ser un valor devuelto por el endpoint Obtener paises

Example:
48
regionId
integer

Id de la región de la que se desean obtener las ciudades Debe ser un valor devuelto por el endpoint Obtener regiones

Example:
2890
Example response:
{
    "success": true,
    "data": [
        {
            "id": 1,
            "name": "Medellín",
            "region_id": 2,
            "region_name": "Antioquia",
            "region_code": "ANT",
            "country_id": 48,
            "country_name": "Colombia",
            "country_code": "CO",
        },
        {
            "id": 2,
            "name": "Envigado",
            "region_id": 2,
            "region_name": "Antioquia",
            "region_code": "ANT",
            "country_id": 48,
            "country_name": "Colombia",
            "country_code": "CO",
        }
    ],
    "message": ""
}
{
    "message": "Unauthenticated."
}

Obtener tipos de documentos

GET
https://production.b2pagos.com
/api/v1/documentTypes
requires authentication

Este endpoint devuelve el listado de tipos de documentos disponibles

Headers

Authorization
Example:
Bearer {PERSONAL_ACCESS_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
Example response:
{
    "success": true,
    "data": [
        {
            "id": 1,
            "name": "NIT",
            "short_name": "NIT"
        },
        {
            "id": 2,
            "name": "Cédula de ciudadanía",
            "short_name": "CC"
        },
        {
            "id": 3,
            "name": "Cédula de extranjería",
            "short_name": "CE"
        },
        {
            "id": 4,
            "name": "Pasaporte",
            "short_name": "PAS"
        },
        {
            "id": 5,
            "name": "Tarjeta de identidad",
            "short_name": "TI"
        },
        {
            "id": 6,
            "name": "Registro civil de nacimiento",
            "short_name": "RC"
        }
    ],
    "message": ""
}
{
    "message": "Unauthenticated."
}

Obtener bancos PSE

GET
https://production.b2pagos.com
/api/v1/pseBanks
requires authentication

Este endpoint devuelve el listado de bancos disponibles en PSE

Headers

Authorization
Example:
Bearer {PERSONAL_ACCESS_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
Example response:
{
    "success": true,
    "data": [
        {
            "name": "BANCO PSE",
            "code": "1101"
        },
        {
            "name": "BANCO UNION COLOMBIANO",
            "code": "1022"
        }
    ],
    "message": ""
}
{
    "message": "Unauthenticated."
}

Bancos

GET
https://production.b2pagos.com
/api/v1/Banks
requires authentication

Headers

Authorization
Example:
Bearer {PERSONAL_ACCESS_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

per_page
integer

records per page

Example:
20
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    access-control-allow-origin
                                                            : *
                                                         
{
    "success": false,
    "data": null,
    "meta": [],
    "message": "Unauthenticated."
}

Códigos CIIU

GET
https://production.b2pagos.com
/api/v1/ciiuCodes
requires authentication

Headers

Authorization
Example:
Bearer {PERSONAL_ACCESS_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

per_page
integer

records per page

Example:
20
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    access-control-allow-origin
                                                            : *
                                                         
{
    "success": false,
    "data": null,
    "meta": [],
    "message": "Unauthenticated."
}

Cobros

POST
https://production.b2pagos.com
/api/v1/charges/link
requires authentication

Este endpoint devuelve un link de cobro con el que se puede iniciar una transacción

Headers

Authorization
Example:
Bearer {PERSONAL_ACCESS_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example response:

Envia un SMS de cobro

POST
https://production.b2pagos.com
/api/v1/charges/sms
requires authentication

Este endpoint envia un link de cobro por medio de SMS

Headers

Authorization
Example:
Bearer {PERSONAL_ACCESS_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example response:
{
    "success": true,
    "data": {
        "ide": "NjM5N2QyZTkyZmY3Ng",
        "total": "1000.00",
        "link": "https://<<baseUrl>>/NjM5N2QyZTkyZmY3Ng",
        "qr": null
    },
    "message": ""
}
{
    "success": false,
    "data": null,
    "message": "No se ha especificado un id de cuenta válido"
}
{
    "message": "Unauthenticated."
}
{
    "success": false,
    "data": "1",
    "message": "El usuario que está autenticado no tiene acceso a la cuenta seleccionada"
}
{
    "success": false,
    "data": [
        "error"
    ],
    "message": "Ocurrió un error generando el recurso"
}

Envia un Whatsapp de cobro

POST
https://production.b2pagos.com
/api/v1/charges/whatsapp
requires authentication

Este endpoint envia un link de cobro por medio de Whatsapp

Headers

Authorization
Example:
Bearer {PERSONAL_ACCESS_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example response:
{
    "success": true,
    "data": {
        "ide": "NjM5N2QyZTkyZmY3Ng",
        "total": "1000.00",
        "link": "https://<<baseUrl>>/NjM5N2QyZTkyZmY3Ng",
        "qr": null
    },
    "message": ""
}
{
    "success": false,
    "data": null,
    "message": "No se ha especificado un id de cuenta válido"
}
{
    "message": "Unauthenticated."
}
{
    "success": false,
    "data": "1",
    "message": "El usuario que está autenticado no tiene acceso a la cuenta seleccionada"
}
{
    "success": false,
    "data": [
        "error"
    ],
    "message": "Ocurrió un error generando el recurso"
}

Envia un email de cobro

POST
https://production.b2pagos.com
/api/v1/charges/email
requires authentication

Este endpoint envia un link de cobro por medio de correo electrónico

Headers

Authorization
Example:
Bearer {PERSONAL_ACCESS_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example response:
{
    "success": true,
    "data": {
        "ide": "NjM5N2QyZTkyZmY3Ng",
        "total": "1000.00",
        "link": "https://<<baseUrl>>/NjM5N2QyZTkyZmY3Ng",
        "qr": null
    },
    "message": ""
}
{
    "success": false,
    "data": null,
    "message": "No se ha especificado un id de cuenta válido"
}
{
    "message": "Unauthenticated."
}
{
    "success": false,
    "data": "1",
    "message": "El usuario que está autenticado no tiene acceso a la cuenta seleccionada"
}
{
    "success": false,
    "data": [
        "error"
    ],
    "message": "Ocurrió un error generando el recurso"
}

Generar un QR de cobro

POST
https://production.b2pagos.com
/api/v1/charges/qr
requires authentication

Este endpoint devuelve un QR en base64 con el que se puede iniciar una transacción

Headers

Authorization
Example:
Bearer {PERSONAL_ACCESS_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example response:
{
    "success": true,
    "data": {
        "ide": "NjM5N2RjMWZlMjU1NQ",
        "total": "1000.00",
        "link": "https://<<baseUrl>>/NjM5N2RjMWZlMjU1NQ",
        "qr": "iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAIAAAAiOjnJAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAXiUlEQVR4nO2dfXRT1ZbA902TUNJCW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B2NE8YI38ED8hSIP35ubmtWvX9rYV/sLJkycPHjyoZIaXX35ZImF1rLCwsObmZiVr86jtKdskp9O5f/9+RuVjx47NmTPHXfL1119TD1NQsdlsLB0rhg8fztKZIjQ0VOEHQVYlbWpqYr8b5OozZ84kh3vxjcVSINDH9O3bV2GfX0YUXru6t67XPwgsFYn0GuhYCBfQsRAuoGMhXPAYvCcmJvrSDnlQOwmSjBgx4ujRo7JX2bRp06ZNm2QPnz17tuyxoOyDWL9+vaQR3NmzZ81msxJ7Ahiyop/C1o8mk0kyoc1mo2paLBbH/XjqV0ilvLxcMtyrT9FBwD6WSmZmJmNFP3aam5slc5JmOxyOIN0g7Qb2gzGqD9doNJJTOkos8RnUS8YYC+ECOhbCBXQshAvoWAgX/h+GEUFXj37f5gAAAABJRU5ErkJggg=="
    },
    "message": ""
}
{
    "success": false,
    "data": null,
    "message": "No se ha especificado un id de cuenta válido"
}
{
    "message": "Unauthenticated."
}
{
    "success": false,
    "data": "1",
    "message": "El usuario que está autenticado no tiene acceso a la cuenta seleccionada"
}
{
    "success": false,
    "data": [
        "error"
    ],
    "message": "Ocurrió un error generando el recurso"
}

Checkout

Crear una transacción

POST
https://production.b2pagos.com
/api/v1/checkout/transactions
requires authentication

Este endpoint permite crear una transacción para su posterior procesamiento

Headers

Authorization
Example:
Bearer {PERSONAL_ACCESS_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example response:
{
    "success": true,
    "data": {
        "ide": "NjM5YzYxM2JjNTBmYg",
        "total": "1000.00",
        "link": "https://<<baseUrl>>/NjM5YzYxM2JjNTBmYg",
        "qr": null
    },
    "message": ""
}
{
    "success": false,
    "data": null,
    "message": "No se ha especificado un id de cuenta válido"
}
{
    "message": "Unauthenticated."
}
{
    "success": false,
    "data": "1",
    "message": "El usuario que está autenticado no tiene acceso a la cuenta seleccionada"
}

Procesar pago PSE

POST
https://production.b2pagos.com
/api/v1/checkout/checkoutPse
requires authentication

Este endpoint retorna un link para inicializar un pago através de PSE

Headers

Authorization
Example:
Bearer {PERSONAL_ACCESS_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example response:
{
    "success": true,
    "data": {
        "ide": "NjM5YzYwZDAwOWFmMA",
        "pseReturnCode": "SUCCESS",
        "link": "https://registro.desarrollo.pse.com.co/PSENF/index.html?enc=847TD1HPg%2boElpGkHFzoBnI8rh2ya8TQgJktzZlvS04%3d",
        "trazabilityCode": "3012132"
    },
    "message": ""
}
{
    "success": false,
    "data": null,
    "message": "No se ha especificado un id de cuenta válido"
}
{
    "message": "Unauthenticated."
}
{
    "success": false,
    "data": "1",
    "message": "El usuario que está autenticado no tiene acceso a la cuenta seleccionada"
}

Procesar pago tarjeta

POST
https://production.b2pagos.com
/api/v1/checkout/checkoutCard
requires authentication

Este endpoint permite procesar un pago por medio de tarjeta

Headers

Authorization
Example:
Bearer {PERSONAL_ACCESS_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example response:
{
    "success": true,
    "data": {
        "status": "APPROVED|REJECTED",
        "details": {
            "success": true,
            "subject": "Método AutorizarNormal consumido exitosamente",
            "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJjMjA1YTJmYy0yNjNkLTRiMmEtYTUzOS04ZjczYzViNzdmYzEiLCJpYXQiOjE2NjgyODU1NjUsImlzcyI6IjVjNGI0ZGI0MGU0MjNkMTQ3MGJjOGM2MyIsIk9yZ1VuaXRJZCI6IjVjNDg5ZGM1MGU0MjNkMTIxODk5Zjc3ZCIsIlBheWxvYWQiOnsiT3JkZXJEZXRhaWxzIjp7Ik9yZGVyTnVtYmVyIjoiMmY5ODFiNzQtZmFiNS00OWNjLTgzMTAtZTM0NmE0MTAxMDczIn19LCJPYmplY3RpZnlQYXlsb2FkIjoidHJ1ZSIsIlJlZmVyZW5jZUlkIjoiMmY5ODFiNzQtZmFiNS00OWNjLTgzMTAtZTM0NmE0MTAxMDczIiwiZXhwIjoxNjk5ODIxNTY1fQ.ZKsmEFwESeNoFop9lgQvbjEinvx4UXS7xuvhimyi0N0",
            "output": "00",
            "details": "{\"stateCode\":\"00\",\"authorizationCode\":\"748492\",\"authorizedAmount\":1000,\"transactionId\":\"92112567523\"}"
        }
    },
    "message": ""
}
{
    "success": false,
    "data": null,
    "message": "No se ha especificado un id de cuenta válido"
}
{
    "message": "Unauthenticated."
}
{
    "success": false,
    "data": "1",
    "message": "El usuario que está autenticado no tiene acceso a la cuenta seleccionada"
}

Estado de transacción

GET
https://production.b2pagos.com
/api/v1/checkout/transactionStatus
requires authentication

Este endpoint devuelve el estado de una transacción

Headers

Authorization
Example:
Bearer {PERSONAL_ACCESS_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

Token
string
required

Id de la transacción devuelto por el método Crear una transacción en el campo ide

Example:
NjM5Nzc1YzAyOTY5ZA
account_id
integer
required

Id de la cuenta con la que se generará el link Debe ser un valor devuelto por el endpoint Obtener listado de cuentas

Example:
2
Example response:
{
    "success": true,
    "data": {
        "status": "APPROVED",
        "details": {
            "entityCode": "10171290997",
            "errorDetails": null,
            "trazabilityCode": "3012132",
            "ticketId": 277,
            "financialInstitutionCode": "1022",
            "serviceCode": "1001",
            "transactionValue": 1000,
            "vatValue": 190,
            "soliciteDate": "2022-12-16T00:00:00",
            "bankProcessDate": "2022-12-16T07:13:29.803",
            "transactionCycle": 1,
            "transactionState": "OK",
            "authorizationID": "9f41e2f0-bc82-4ab1-8",
            "serviceNIT": "10171290997",
            "serviceName": "Recaudo",
            "userType": "person",
            "paymentDescription": "Compra ecommerce #645213",
            "referenceNumber1": "",
            "referenceNumber2": "",
            "referenceNumber3": "",
            "paymentOrigin": 3,
            "paymentMode": 15,
            "identificationNumber": "1036636123",
            "fullName": "Juan David Maya Galeano",
            "cellphoneNumber": "3215704751",
            "address": "P. Sherman 42 Wallaby Way Sydney",
            "email": "david@mayagaleano.com",
            "returnCode": "SUCCESS"
        }
    },
    "message": ""
}
{
    "success": false,
    "data": null,
    "message": "No se ha especificado un id de cuenta válido"
}
{
    "message": "Unauthenticated."
}
{
    "success": false,
    "data": "1",
    "message": "El usuario que está autenticado no tiene acceso a la cuenta seleccionada"
}

Onboarding

Register

POST
https://production.b2pagos.com
/api/v1/Onboarding/signup
requires authentication

Headers

Authorization
Example:
Bearer {PERSONAL_ACCESS_TOKEN}
Content-Type
Example:
multipart/form-data
Accept
Example:
application/json

Body Parameters

Transacciones

getTransactionsBy

GET
https://production.b2pagos.com
/api/v1/transactions/getTransactionsBy/{account_id}/{by}/{value}
requires authentication

Headers

Authorization
Example:
Bearer {PERSONAL_ACCESS_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

account_id
integer
required

Id de la cuenta a la que pertence la transacción.

Example:
1
by
string
required

Variable por la que se desea ubicar la transacción
extra_1|extra_2|extra_3|extra_4|transaction_date.

Example:
extra_1
value
string
required

Valor que se desea usar para encontrar una transacción .

Example:
invoice-001

Query Parameters

per_page
number

Número de registros por página,
por defecto: 15.

Example:
10
page
number

Página de resultados.

Example:
1
Example response:

disablePendingTransaction

PUT
https://production.b2pagos.com
/api/v1/transactions/disablePendingTransaction/{account_id}/{transaction_ide}
requires authentication

Headers

Authorization
Example:
Bearer {PERSONAL_ACCESS_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

account_id
integer
required

Id de la cuenta a la que pertence la transacción.

Example:
1
transaction_ide
string
required

Token de la transacción.

Example:
NjQ3N2UzMmRlOWE5YQ

Widgets

Webcheckout Widget

GET
https://production.b2pagos.com
/api/v1/webcheckout
requires authentication

Esta documentación explica como integrar de manera simple nuestro plugin de webcheckout. Esta es la forma más rápida y sencilla de comenzar a procesar pagos sin necesidad de escribir mucho código.

Headers

Authorization
Example:
Bearer {PERSONAL_ACCESS_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json
Example response:
Headers
                                                            content-type
                                                            : text/html; charset=UTF-8
                                                                                                                    cache-control
                                                            : no-cache, private
                                                                                                                    x-ratelimit-limit
                                                            : 60
                                                                                                                    x-ratelimit-remaining
                                                            : 59
                                                                                                                    access-control-allow-origin
                                                            : *