Obtener transacciones
curl --request GET \
--url https://api.onepay.la/v1/customers/{customer_id}/transactions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.onepay.la/v1/customers/{customer_id}/transactions"
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/customers/{customer_id}/transactions', 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/customers/{customer_id}/transactions",
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/customers/{customer_id}/transactions"
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/customers/{customer_id}/transactions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onepay.la/v1/customers/{customer_id}/transactions")
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{
"data":[
{
"id":"0194b42f-5515-7245-b9f4-193c92f37b8c",
"type":"deposit",
"amount":1000,
"label":"$1.000",
"concept":"Transferencia de fondos a Andres Silva G\u00f3mez, enviado por Andres Silva Gomez",
"subtype":"WITHDRAW",
"confirmed":true,
"node_type":"CashoutLine",
"created_at":"2025-01-29T22:29:48.000000Z",
"node":{
"id":"9e16627d-1eb9-46c4-ba19-b229ea77d68e",
"customer_id":"9957858a-c2f1-4f18-a5c2-216b4127e278",
"account_id":"9d005522-fad4-44c2-9012-1dbb871322b5",
"is_test":false,
"amount":1000,
"status":"processed",
"scheduled_at":null,
"created_at":"2025-01-29T22:29:48.000000Z",
"external_id":null,
"method":"TURBO"
}
},
{
"id":"0194ad6d-2464-7215-a9a6-8e88d9a5a09d",
"type":"deposit",
"amount":1000,
"label":"$1.000",
"concept":"Transferencia de fondos",
"subtype":"WITHDRAW",
"confirmed":true,
"node_type":"CashoutLine",
"created_at":"2025-01-28T14:59:58.000000Z",
"node":{
"id":"9e13bea1-e7fd-40be-b2e7-35098504268f",
"customer_id":"9957858a-c2f1-4f18-a5c2-216b4127e278",
"account_id":"9d005522-fad4-44c2-9012-1dbb871322b5",
"is_test":false,
"amount":1000,
"status":"processed",
"scheduled_at":null,
"created_at":"2025-01-28T14:59:58.000000Z",
"external_id":null,
"method":"ACH"
}
},
],
"current_page":1,
"from":1,
"last_page":65,
"per_page":20,
"to":20,
"total":1291
}
{
"message": "Registro no encontrado, Cliente no existe",
"code": 10002,
"code_name": "record_not_found"
}
Transacciones
Obtener transacciones de una billetera.
GET
/
customers
/
{customer_id}
/
transactions
Obtener transacciones
curl --request GET \
--url https://api.onepay.la/v1/customers/{customer_id}/transactions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.onepay.la/v1/customers/{customer_id}/transactions"
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/customers/{customer_id}/transactions', 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/customers/{customer_id}/transactions",
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/customers/{customer_id}/transactions"
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/customers/{customer_id}/transactions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onepay.la/v1/customers/{customer_id}/transactions")
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{
"data":[
{
"id":"0194b42f-5515-7245-b9f4-193c92f37b8c",
"type":"deposit",
"amount":1000,
"label":"$1.000",
"concept":"Transferencia de fondos a Andres Silva G\u00f3mez, enviado por Andres Silva Gomez",
"subtype":"WITHDRAW",
"confirmed":true,
"node_type":"CashoutLine",
"created_at":"2025-01-29T22:29:48.000000Z",
"node":{
"id":"9e16627d-1eb9-46c4-ba19-b229ea77d68e",
"customer_id":"9957858a-c2f1-4f18-a5c2-216b4127e278",
"account_id":"9d005522-fad4-44c2-9012-1dbb871322b5",
"is_test":false,
"amount":1000,
"status":"processed",
"scheduled_at":null,
"created_at":"2025-01-29T22:29:48.000000Z",
"external_id":null,
"method":"TURBO"
}
},
{
"id":"0194ad6d-2464-7215-a9a6-8e88d9a5a09d",
"type":"deposit",
"amount":1000,
"label":"$1.000",
"concept":"Transferencia de fondos",
"subtype":"WITHDRAW",
"confirmed":true,
"node_type":"CashoutLine",
"created_at":"2025-01-28T14:59:58.000000Z",
"node":{
"id":"9e13bea1-e7fd-40be-b2e7-35098504268f",
"customer_id":"9957858a-c2f1-4f18-a5c2-216b4127e278",
"account_id":"9d005522-fad4-44c2-9012-1dbb871322b5",
"is_test":false,
"amount":1000,
"status":"processed",
"scheduled_at":null,
"created_at":"2025-01-28T14:59:58.000000Z",
"external_id":null,
"method":"ACH"
}
},
],
"current_page":1,
"from":1,
"last_page":65,
"per_page":20,
"to":20,
"total":1291
}
{
"message": "Registro no encontrado, Cliente no existe",
"code": 10002,
"code_name": "record_not_found"
}
string
required
ID del cliente dueño de la billetera. Crear cliente.
{
"data":[
{
"id":"0194b42f-5515-7245-b9f4-193c92f37b8c",
"type":"deposit",
"amount":1000,
"label":"$1.000",
"concept":"Transferencia de fondos a Andres Silva G\u00f3mez, enviado por Andres Silva Gomez",
"subtype":"WITHDRAW",
"confirmed":true,
"node_type":"CashoutLine",
"created_at":"2025-01-29T22:29:48.000000Z",
"node":{
"id":"9e16627d-1eb9-46c4-ba19-b229ea77d68e",
"customer_id":"9957858a-c2f1-4f18-a5c2-216b4127e278",
"account_id":"9d005522-fad4-44c2-9012-1dbb871322b5",
"is_test":false,
"amount":1000,
"status":"processed",
"scheduled_at":null,
"created_at":"2025-01-29T22:29:48.000000Z",
"external_id":null,
"method":"TURBO"
}
},
{
"id":"0194ad6d-2464-7215-a9a6-8e88d9a5a09d",
"type":"deposit",
"amount":1000,
"label":"$1.000",
"concept":"Transferencia de fondos",
"subtype":"WITHDRAW",
"confirmed":true,
"node_type":"CashoutLine",
"created_at":"2025-01-28T14:59:58.000000Z",
"node":{
"id":"9e13bea1-e7fd-40be-b2e7-35098504268f",
"customer_id":"9957858a-c2f1-4f18-a5c2-216b4127e278",
"account_id":"9d005522-fad4-44c2-9012-1dbb871322b5",
"is_test":false,
"amount":1000,
"status":"processed",
"scheduled_at":null,
"created_at":"2025-01-28T14:59:58.000000Z",
"external_id":null,
"method":"ACH"
}
},
],
"current_page":1,
"from":1,
"last_page":65,
"per_page":20,
"to":20,
"total":1291
}
{
"message": "Registro no encontrado, Cliente no existe",
"code": 10002,
"code_name": "record_not_found"
}
Was this page helpful?
⌘I