Listar payment intents
curl --request GET \
--url https://api.onepay.la/v1/payment-intents \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.onepay.la/v1/payment-intents"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.onepay.la/v1/payment-intents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.onepay.la/v1/payment-intents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.onepay.la/v1/payment-intents"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.onepay.la/v1/payment-intents")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onepay.la/v1/payment-intents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"current_page": 1,
"from": 1,
"last_page": 3,
"per_page": 20,
"to": 20,
"total": 50,
"data": [
{
"id": "a1b2c3d4-1111-2222-3333-444455556666",
"description": "Cargo suscripción Premium",
"amount": 63040,
"amount_label": "$63.040",
"currency": "COP",
"status": "processing",
"payment_method_type": "CreditCard",
"payment_method_id": "3f8b7a21-1d4a-4d2e-8f1a-17e2f1e6b9ab",
"source": {
"type": "Link",
"id": "9b7e45b5-05e2-4b4e-bb1c-3d8a6a3c15e2"
},
"created_at": "2024-11-02T16:47:09.000000Z",
"paid_at": null,
"remarks": null,
"is_test": true,
"network_id": null,
"external_id": null
},
{
"id": "7777c3d4-8888-9999-aaaa-bbbbccccdddd",
"description": "Pago factura 001-2024",
"amount": 250000,
"amount_label": "$250.000",
"currency": "COP",
"status": "paid",
"payment_method_type": "Account",
"payment_method_id": "8d3fe7c0-6f0c-4de0-99d2-4c86f4f0a9f0",
"source": {
"type": "Payment",
"id": "12e34567-89ab-4cde-f012-3456789abcde"
},
"created_at": "2024-10-20T12:00:00.000000Z",
"paid_at": "2024-10-20T12:10:10.000000Z",
"remarks": null,
"is_test": true,
"network_id": "prov-123",
"external_id": "EXT-12345"
}
]
}
Listar payment intents
Obtiene una lista paginada de payment intents (intentos de pago) de tu compañía
GET
/
payment-intents
Listar payment intents
curl --request GET \
--url https://api.onepay.la/v1/payment-intents \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.onepay.la/v1/payment-intents"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.onepay.la/v1/payment-intents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.onepay.la/v1/payment-intents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.onepay.la/v1/payment-intents"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.onepay.la/v1/payment-intents")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onepay.la/v1/payment-intents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"current_page": 1,
"from": 1,
"last_page": 3,
"per_page": 20,
"to": 20,
"total": 50,
"data": [
{
"id": "a1b2c3d4-1111-2222-3333-444455556666",
"description": "Cargo suscripción Premium",
"amount": 63040,
"amount_label": "$63.040",
"currency": "COP",
"status": "processing",
"payment_method_type": "CreditCard",
"payment_method_id": "3f8b7a21-1d4a-4d2e-8f1a-17e2f1e6b9ab",
"source": {
"type": "Link",
"id": "9b7e45b5-05e2-4b4e-bb1c-3d8a6a3c15e2"
},
"created_at": "2024-11-02T16:47:09.000000Z",
"paid_at": null,
"remarks": null,
"is_test": true,
"network_id": null,
"external_id": null
},
{
"id": "7777c3d4-8888-9999-aaaa-bbbbccccdddd",
"description": "Pago factura 001-2024",
"amount": 250000,
"amount_label": "$250.000",
"currency": "COP",
"status": "paid",
"payment_method_type": "Account",
"payment_method_id": "8d3fe7c0-6f0c-4de0-99d2-4c86f4f0a9f0",
"source": {
"type": "Payment",
"id": "12e34567-89ab-4cde-f012-3456789abcde"
},
"created_at": "2024-10-20T12:00:00.000000Z",
"paid_at": "2024-10-20T12:10:10.000000Z",
"remarks": null,
"is_test": true,
"network_id": "prov-123",
"external_id": "EXT-12345"
}
]
}
Query Parameters
ID único del payment intent
Filtra por estado. Valores posibles: created, paid, processing, failed, refunded, disputed.
Identificador externo definido por tu sistema para correlacionar transacciones.
Ordena los resultados. Valores: created_at | -created_at | paid_at | -paid_at
Página a consultar (paginación base 1). Por defecto: 1
Response
Lista de payment intents
Show Ver objeto
Show Ver objeto
Identificador único (UUID)
Descripción del cobro
Monto del cobro en unidades monetarias (no centavos)
Monto formateado con moneda
Moneda. Ej: COP
Estado actual
Tipo del método de pago (CreditCard, Account, Wallet, etc.)
ID del método de pago
Origen del cobro (Link, Payment, Plan, Subscription). Puede variar según el caso.
Fecha de creación (ISO 8601)
Fecha de pago si aplica
Observaciones o marcas internas
Indica si pertenece al entorno de pruebas
ID de la red/proveedor si aplica
ID externo proporcionado por tu sistema
Página actual
Índice inicial del listado
Número total de páginas
Tamaño de página (por defecto 20)
Índice final del listado
Total de registros
Response Example
{
"current_page": 1,
"from": 1,
"last_page": 3,
"per_page": 20,
"to": 20,
"total": 50,
"data": [
{
"id": "a1b2c3d4-1111-2222-3333-444455556666",
"description": "Cargo suscripción Premium",
"amount": 63040,
"amount_label": "$63.040",
"currency": "COP",
"status": "processing",
"payment_method_type": "CreditCard",
"payment_method_id": "3f8b7a21-1d4a-4d2e-8f1a-17e2f1e6b9ab",
"source": {
"type": "Link",
"id": "9b7e45b5-05e2-4b4e-bb1c-3d8a6a3c15e2"
},
"created_at": "2024-11-02T16:47:09.000000Z",
"paid_at": null,
"remarks": null,
"is_test": true,
"network_id": null,
"external_id": null
},
{
"id": "7777c3d4-8888-9999-aaaa-bbbbccccdddd",
"description": "Pago factura 001-2024",
"amount": 250000,
"amount_label": "$250.000",
"currency": "COP",
"status": "paid",
"payment_method_type": "Account",
"payment_method_id": "8d3fe7c0-6f0c-4de0-99d2-4c86f4f0a9f0",
"source": {
"type": "Payment",
"id": "12e34567-89ab-4cde-f012-3456789abcde"
},
"created_at": "2024-10-20T12:00:00.000000Z",
"paid_at": "2024-10-20T12:10:10.000000Z",
"remarks": null,
"is_test": true,
"network_id": "prov-123",
"external_id": "EXT-12345"
}
]
}
Was this page helpful?
⌘I