Link de Pagos API

Te explicamos cómo utilizar nuestra API para crear, listar, obtener y cancelar links de pago.

¿Qué es un Link de Pago?

Un Link de Pago es una URL compartible que lleva a los clientes a una página de pago alojada, donde pueden realizar un pago de forma segura y sencilla a través de su cuenta bancaria.

Crear link de Pagos

A continuación te mostramos como crear link de pagos utilizando nuestra API.

Creando un Link de Pago

Generamos un enlace de pago a través de la API, empleando una solicitud HTTP POST descrita en el código, lo que permitirá a los clientes efectuar pagos de manera rápida y segura.

POST /api/v1/payment-link/ HTTP/1.1
Host: payment.prometeoapi.net
Content-Type: application/json
Accept: application/json
X-API-Key: your_api_key
Content-Length: 271

{
    "product_id": "your_widget_id",
    "external_id": "test",
    "concept": "1234",
    "currency": "UYU",
    "amount": "150",
    "expires_at": "2023-12-21T21:25:37.311Z",
    "email": "[email protected]",
    "reusable": false
}
curl --location 'https://payment.prometeoapi.net/api/v1/payment-link/' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'X-API-Key: your_api_key' \
--data-raw '{
    "product_id": "your_widget_id",
    "external_id": "test",
    "concept": "1234",
    "currency": "UYU",
    "amount": "150",
    "expires_at": "2023-12-21T21:25:37.311Z",
    "email": "[email protected]",
    "reusable": false
}'
import requests
import json

url = "https://payment.prometeoapi.net/api/v1/payment-link/"

payload = json.dumps({
  "product_id": "your_widget_id",
  "external_id": "test",
  "concept": "1234",
  "currency": "UYU",
  "amount": "150",
  "expires_at": "2023-12-21T21:25:37.311Z",
  "email": "[email protected]",
  "reusable": False
})
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
	'X-API-Key':'your_api_key'
}

response = requests.request("POST", url, headers=headers, data=payload)
var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://payment.prometeoapi.net/api/v1/payment-link/',
  'headers': {
    'Content-Type': 'application/json',
    'Accept': 'application/json',
		'X-API-Key': 'your_api_key'
  },
  body: JSON.stringify({
  	"product_id": "your_widget_id",
    "external_id": "test",
    "concept": "1234",
    "currency": "UYU",
    "amount": "150",
    "expires_at": "2023-12-21T21:25:37.311Z",
    "email": "[email protected]",
    "reusable": false
  })

Respuesta exitosa

{
    "id": "JF8MENXXXX",
    "url": "https://pay.prometeoapi.com/JF8MENXXXX",
    "expires_at": "2023-12-21T21:25:37.311000Z",
    "qr_code": "iVBORw0KGgoAAAANSUhEUgAAAXIAAAFyAQAAAADAX2ykAAACi0lEQVR4nO2bTW7bMBBG31QCvKSAHqBHoW7QIwU9Um8gHiUHCEAtA0j4uiCp2CnaJKjjmsBwYdD0Wwww+Mj5s4mPrPTlQzg477zzzjvvvPN/4q2ukfoxUXawtt/mG9rj/JX5KEnKIGlDykDMu9nMIEnSJf/Z9jh/ZX5tCk1mZvNqph/TIC0cSr6pPc5fhx9ffbcogHXYLAos/rytPc5/Mp9shDTVnZb/bY/z/8Q3/QYBKxAXsHr2ZAI4L4Hcm/3Ov4tPZmY2AawjxAzEx5NsZi/h823tcf5KfNHvmULTNADspvRtQ5fqvT/7nX9jleQnSqqqzYOAQRC2BoWKaLk3+51/F59sBIKkHxMl9ZUeT6rx1er3c6d8028+DoKqV+NR1Yhy/XbKF/+WglW5hvOgMye/3NTu3x75El8ZDBus4ybYUPq+jyJkjJAR7C3Mujf7nX9jFfkuQZK00W7qGmRpKTtcv33y7X7WxoUvN6R84WT3b7+8zQCErRQktaytSEl4NnvQs8fPffLH/dwEW2TKUM6Kz0vP0PXbIV/zo1rB2CheranRcATWHj93yh/1yX0kWX1/lQyUZmiNh5PsNvY4/3l81IY9ZLC5lSZtZjcI/v52zZvZSaV1lCaOru9upDKONfh8Ts98zY/C1voL60k2t6zovHp5n/Y7/3f+ZX4S2GtCFPNuVdM+f9Urf9YflPJwWcTiaC14ftQpf94/qq2FWuQg6qX/6/7tlH89PynWEQhPo5INMkIu5xaXW9jj/CfzaaLcz/agZytKTj5/1Sv/2/xkEez6VaQpy2LeRxGeGndv9jv/xjr/80nrH7VI66Jw6e9vj/zr+cm6a/WrNv/s9Q3nnXfeeeedXXL/XXXRsgRzHZ2pAAAAAElFTkSuQmCC"
}

Listar link de Pagos

A continuación te mostramos como listar los links de pagos generados por nuestra API.

Listando Links de Pagos

A través de una solicitud HTTP POST, la cual describiremos en el código a continuación, podemos acceder al listado de los enlaces de pago generados.

POST /api/v1/payment-link/list HTTP/1.1
Host: payment.prometeoapi.net
Accept: application/json
X-API-Key: your_api_key
Content-Type: application/json
Content-Length: 62

{
    "widget_ids": ["your_widget_id"]
}
curl --location 'https://payment.prometeoapi.net/api/v1/payment-link/list' \
--header 'Accept: application/json' \
--header 'X-API-Key: your_api_key' \
--header 'Content-Type: application/json' \
--data '{
    "widget_ids": ["your_widget_id"]
}'
import requests
import json

url = "https://payment.prometeoapi.net/api/v1/payment-link/list"

payload = json.dumps({
  "widget_ids": [
    "your_widget_id"
  ]
})
headers = {
  'Accept': 'application/json',
	'X-API-Key':'your_api_key'
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)
var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://payment.prometeoapi.net/api/v1/payment-link/list',
  'headers': {
    'Accept': 'application/json',
		'X-API-Key':'your_api_key'
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "widget_ids": [
    	"your_widget_id"
    ]
  })
};

Respuesta exitosa

{
  "count": 123,
  "next": "http://api.example.org/accounts/?page=4",
  "previous": "http://api.example.org/accounts/?page=2",
  "results": [
    {
      "created_at": "1949-01-31T01:21:03.907Z",
      "id": "ea",
      "intents": [
        "urn:uuid:2968a14d-2347-6bf7-176a-a8bfa5ddbd11",
        "urn:uuid:8ba427db-1f6a-94b5-c684-141916427c85"
      ],
      "payment_data": {
        "currency": "irure sint commodo fugiat",
        "amount": "0.0",
        "concept": "cul",
        "external_id": "sint ex elit dolor sit"
      },
      "product_id": "347cc05d-f1b6-dd22-4c60-063ffb8253d3",
      "url": "nisi esse enim",
      "status": "expired",
      "expires_at": "1961-09-15T15:40:30.620Z",
      "qr_code": "amet occaecat anim cillum do",
      "email": "[email protected]",
      "reusable": true
    },
    {
      "created_at": "2009-03-09T19:32:56.846Z",
      "id": "qui in id fugiat",
      "intents": [
        "urn:uuid:f2d8b56e-8725-d553-8ed2-3c09b4ce9ea8",
        "urn:uuid:90d37856-ff79-83cf-37d4-1e144f7d84f3"
      ],
      "payment_data": {
        "currency": "consectetur Duis",
        "amount": "93.",
        "concept": "ut fugiat mollit sed consequ",
        "external_id": "labore sed commodo cillum Lorem"
      },
      "product_id": "urn:uuid:f4508839-b7ad-38e5-9093-9fef185e3c01",
      "url": "magna exercitation",
      "status": "active",
      "expires_at": "2007-09-06T03:03:12.937Z",
      "qr_code": "qui elit cupidatat ea",
      "email": "[email protected]",
      "reusable": true
    }
  ]
}

Obtener el detalle de un link de Pago

A continuación te mostramos como obtener el detalle de un link de pagos utilizando nuestra API.

Detallando Links de Pagos

Este es un ejemplo de cómo obtener el detalle de un link de pagos a través de una solicitud HTTP GET realizada a nuestra API.

GET /api/v1/payment-link/0WNW69FXXX HTTP/1.1
Host: payment.prometeoapi.net
Accept: application/json
curl --location 'https://payment.prometeoapi.net/api/v1/payment-link/0WNW69FXXX' \
--header 'Accept: application/json'
import requests

url = "https://payment.prometeoapi.net/api/v1/payment-link/0WNW69FXXX"

payload={}
headers = {
  'Accept': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)
var request = require('request');
var options = {
  'method': 'GET',
  'url': 'https://payment.prometeoapi.net/api/v1/payment-link/0WNW69FXXX',
  'headers': {
    'Accept': 'application/json'
  }
};

Respuesta exitosa

{
    "id": "0WNW69FXXX",
    "product_id": "c707a703-107e-4760-b3d3-24deb3eXXXXX",
    "url": "https://pay.prometeoapi.com/0WNW69FXXX",
    "status": "active",
    "expires_at": null,
    "qr_code": "iVBORw0KGgoAAAANSUhEUgAAAXIA...",
    "payment_data": {
        "amount": 100.0,
        "currency": "UYU",
        "concept": "ABC123 123123",
        "external_id": null,
        "intent_id": "d066119b-629e-42cc-909e-8f74097XXXXX"
    },
    "created_at": "2023-04-24T18:24:36.566025Z",
    "email": null,
    "reusable": true
}

Descargar link de Pagos

A continuación, presentamos el procedimiento para obtener o descargar un archivo en formato CSV que contiene un listado de links correspondientes a tu widget ID, utilizando nuestra API mediante una solicitud HTTP POST.

Descargar Link de Pagos

POST /api/v1/payment-link/download HTTP/1.1
Host: payment.prometeoapi.net
Accept: application/json
X-API-Key: your_api_key
Content-Type: application/json
Content-Length: 62

{
    "widget_ids": ["your_widget_id"]
}
curl --location 'https://payment.prometeoapi.net/api/v1/payment-link/download' \
--header 'Accept: application/json' \
--header 'X-API-Key: your_api_key' \
--header 'Content-Type: application/json' \
--data '{
    "widget_ids": ["your_widget_id"]
}'
import requests
import json

url = "https://payment.prometeoapi.net/api/v1/payment-link/download"

payload = json.dumps({
  "widget_ids": [
    "91f151a0-5944-497e-a14c-5a97789dbd44"
  ]
})
headers = {
  'Accept': 'application/json',
  'X-API-Key': 'SjrfHyOAEf3yRQJNvYU7qoc0W8uiReNCblXIRoAC8tcQcTAn5gvn17lsM5Z3rgjy',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)
var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://payment.prometeoapi.net/api/v1/payment-link/download',
  'headers': {
    'Accept': 'application/json',
    'X-API-Key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "widget_ids": [
      "your_widget_id"
    ]
  })
};

Respuesta exitosa

"id","product_id","url","status","amount","currency","concept","external_id","created_at","expires_at","email","reusable","paid"
"CI7W8Y4XXX","your_widget_id","https://pay.prometeoapi.com/CI7W8Y4XXX","active","",161,"test","0c7ae29c-840f-4cba-b450-bf1e2ca7bcf733333333333333","2023-05-16T21:37:08.690399Z","2023-12-21T21:25:37.311000Z","[email protected]",False,False
"CI7W6I7XXX","your_widget_id","https://pay.prometeoapi.com/CI7W6I7XXX","active","",192,"test","0c7ae29c-840f-4cba-b450-bf1e2ca7bcf733333333333333","2023-05-16T21:37:08.690399Z","2023-12-21T21:25:37.311000Z","[email protected]",True,False
"CI3W6MTXXX","your_widget_id","https://pay.prometeoapi.com/CI3W6MTXXX","active","",344,"test","0c7ae29c-840f-4cba-b450-bf1e2ca7bcf733333333333333","2023-05-16T21:37:08.690399Z","2023-12-21T21:25:37.311000Z","[email protected]",False,True
"CI9J6I8XXX","your_widget_id","https://pay.prometeoapi.com/CI9J6I8XXX","active","",325,"test","0c7ae29c-840f-4cba-b450-bf1e2ca7bcf733333333333333","2023-05-16T21:37:08.690399Z","2023-12-21T21:25:37.311000Z","[email protected]",True,True

Cancelar link de Pagos

A continuación te mostramos como cancelar un link de pagos existente utilizando nuestra API a través de una solicitud HTTP POST.

Cancelando Links de Pagos

POST /api/v1/payment-link/cancel HTTP/1.1
Host: payment.prometeoapi.net
X-API-Key: your_api_key
Content-Type: application/json
Content-Length: 28

{
    "ids":["JF8MEN5XXX"]
}
curl --location 'https://payment.prometeoapi.net/api/v1/payment-link/cancel' \
--header 'X-API-Key: your_api_key' \
--header 'Content-Type: application/json' \
--data '{
    "ids":["JF8MEN5XXX"]
}'
import requests
import json

url = "https://payment.prometeoapi.net/api/v1/payment-link/cancel"

payload = json.dumps({
  "ids": [
    "JF8MEN5XXX"
  ]
})
headers = {
	'X-API-Key':'your_api_key'
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)
ar request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://payment.prometeoapi.net/api/v1/payment-link/cancel',
  'headers': {
		'X-API-Key':'your_api_key'
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "ids": [
      "JF8MEN5XXX"
    ]
  })
};

Respuesta exitosa

{
    "payment_links_canceled": 1
}