Obtener payment intent
curl --request GET \
--url https://api.onepay.la/v1/payment-intents/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.onepay.la/v1/payment-intents/{id}"
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/{id}', 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/{id}",
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/{id}"
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/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onepay.la/v1/payment-intents/{id}")
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{
"id": "9bf2bc44-28d4-4693-9896-7fc1fe1f5b65",
"description": "Pago factura 001-2024",
"amount": 63040,
"amount_label": "$63.040",
"currency": "COP",
"status": "paid",
"payment_method_type": "CreditCard",
"payment_method_id": "3f8b7a21-1d4a-4d2e-8f1a-17e2f1e6b9ab",
"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",
"method": {
"id": "3f8b7a21-1d4a-4d2e-8f1a-17e2f1e6b9ab",
"brand": "visa",
"label": "Personal",
"last_four": "4242",
"expiration_date": "12/2028",
"customer_id": "1c2d3e4f-5678-90ab-cdef-111213141516",
"created_at": "2024-09-15T10:20:30.000000Z",
"country": "CO"
},
"customer": {
"id": "4e5f6a7b-8c9d-0e1f-2345-6789abcdef01",
"first_name": "Juan",
"last_name": "Pérez",
"email": "juan.perez@example.com",
"phone": "+573001112233",
"document_type": "CC",
"document_number": "1234567890",
"created_at": "2024-09-10T09:00:00.000000Z",
"is_test": true
}
}
Obtener payment intent
Obtiene el detalle de un payment intent (intento de pago) de tu compañía
GET
/
payment-intents
/
{id}
Obtener payment intent
curl --request GET \
--url https://api.onepay.la/v1/payment-intents/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.onepay.la/v1/payment-intents/{id}"
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/{id}', 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/{id}",
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/{id}"
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/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onepay.la/v1/payment-intents/{id}")
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{
"id": "9bf2bc44-28d4-4693-9896-7fc1fe1f5b65",
"description": "Pago factura 001-2024",
"amount": 63040,
"amount_label": "$63.040",
"currency": "COP",
"status": "paid",
"payment_method_type": "CreditCard",
"payment_method_id": "3f8b7a21-1d4a-4d2e-8f1a-17e2f1e6b9ab",
"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",
"method": {
"id": "3f8b7a21-1d4a-4d2e-8f1a-17e2f1e6b9ab",
"brand": "visa",
"label": "Personal",
"last_four": "4242",
"expiration_date": "12/2028",
"customer_id": "1c2d3e4f-5678-90ab-cdef-111213141516",
"created_at": "2024-09-15T10:20:30.000000Z",
"country": "CO"
},
"customer": {
"id": "4e5f6a7b-8c9d-0e1f-2345-6789abcdef01",
"first_name": "Juan",
"last_name": "Pérez",
"email": "juan.perez@example.com",
"phone": "+573001112233",
"document_type": "CC",
"document_number": "1234567890",
"created_at": "2024-09-10T09:00:00.000000Z",
"is_test": true
}
}
Path Parameters
string
ID del payment intent (UUID)
Response
string
Identificador único (UUID)
string
Descripción del cobro
number
Monto del cobro en unidades monetarias (no centavos)
string
Monto formateado con moneda
string
Moneda. Ej: COP
string
Estado actual
string
Tipo del método de pago (CreditCard, Account, Wallet, etc.)
string
ID del método de pago
object
Origen del cobro (Link, Payment, Plan, Subscription). Puede variar según el caso.
string
Fecha de creación (ISO 8601)
string|null
Fecha de pago si aplica
object|null
Observaciones o marcas internas
boolean
Indica si pertenece al entorno de pruebas
string|null
ID de la red/proveedor si aplica
string|null
ID externo proporcionado por tu sistema
object
Método de pago asociado. La forma del objeto depende de payment_method_type.
Show Cuando payment_method_type = CreditCard
Show Cuando payment_method_type = CreditCard
Show Cuando payment_method_type = Account
Show Cuando payment_method_type = Account
string
ID de la autorización de cuenta
string
Nombre asignado
string
Tipo de cuenta (checking | savings)
string
Estado de la autorización
boolean
Indica si existe autorización activa
string
ID del titular
boolean
Si requiere re-vinculación
string|null
ID externo si aplica
string
Banco
object
Objeto del banco con id, name y logo
object
Response Example
{
"id": "9bf2bc44-28d4-4693-9896-7fc1fe1f5b65",
"description": "Pago factura 001-2024",
"amount": 63040,
"amount_label": "$63.040",
"currency": "COP",
"status": "paid",
"payment_method_type": "CreditCard",
"payment_method_id": "3f8b7a21-1d4a-4d2e-8f1a-17e2f1e6b9ab",
"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",
"method": {
"id": "3f8b7a21-1d4a-4d2e-8f1a-17e2f1e6b9ab",
"brand": "visa",
"label": "Personal",
"last_four": "4242",
"expiration_date": "12/2028",
"customer_id": "1c2d3e4f-5678-90ab-cdef-111213141516",
"created_at": "2024-09-15T10:20:30.000000Z",
"country": "CO"
},
"customer": {
"id": "4e5f6a7b-8c9d-0e1f-2345-6789abcdef01",
"first_name": "Juan",
"last_name": "Pérez",
"email": "juan.perez@example.com",
"phone": "+573001112233",
"document_type": "CC",
"document_number": "1234567890",
"created_at": "2024-09-10T09:00:00.000000Z",
"is_test": true
}
}
Was this page helpful?
⌘I