Billetera a billetera
curl --request POST \
--url https://api.onepay.la/v1/customers/transfer \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-idempotency: <x-idempotency>' \
--data '
{
"origin": "<string>",
"destination": "<string>",
"amount": "<string>",
"concept": "<string>",
"external_id": "<string>"
}
'import requests
url = "https://api.onepay.la/v1/customers/transfer"
payload = {
"origin": "<string>",
"destination": "<string>",
"amount": "<string>",
"concept": "<string>",
"external_id": "<string>"
}
headers = {
"x-idempotency": "<x-idempotency>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-idempotency': '<x-idempotency>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
origin: '<string>',
destination: '<string>',
amount: '<string>',
concept: '<string>',
external_id: '<string>'
})
};
fetch('https://api.onepay.la/v1/customers/transfer', 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/transfer",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'origin' => '<string>',
'destination' => '<string>',
'amount' => '<string>',
'concept' => '<string>',
'external_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-idempotency: <x-idempotency>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.onepay.la/v1/customers/transfer"
payload := strings.NewReader("{\n \"origin\": \"<string>\",\n \"destination\": \"<string>\",\n \"amount\": \"<string>\",\n \"concept\": \"<string>\",\n \"external_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-idempotency", "<x-idempotency>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.onepay.la/v1/customers/transfer")
.header("x-idempotency", "<x-idempotency>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"origin\": \"<string>\",\n \"destination\": \"<string>\",\n \"amount\": \"<string>\",\n \"concept\": \"<string>\",\n \"external_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onepay.la/v1/customers/transfer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-idempotency"] = '<x-idempotency>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"origin\": \"<string>\",\n \"destination\": \"<string>\",\n \"amount\": \"<string>\",\n \"concept\": \"<string>\",\n \"external_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "0194b9a9-45e4-73c5-8139-44d3813d8f29",
"type": "withdraw",
"amount": -1000,
"label": "$1.000",
"concept": "Prueba",
"subtype": "WALLET_TRANSFER",
"confirmed": true,
"node_type": null,
"created_at": "2025-01-31",
"external_id": "ref-001",
"node": null
}
{
"message": "No tienes fondos suficientes para hacer está operación, necesitas depositar fondos para continuar.",
"code": 10501,
"code_name": "insufficient_funds"
}
{
"message": "Registro no encontrado, Cliente no existe",
"code": 10002,
"code_name": "record_not_found"
}
{
"message": "No se puede generar la operación, genera un token de idempotencia y envíelo en los headers como x-idempotency",
"code": 10003,
"code_name": "idempotency_error"
}
Billetera a billetera
Enviar dinero a otra billetera.
POST
/
customers
/
transfer
Billetera a billetera
curl --request POST \
--url https://api.onepay.la/v1/customers/transfer \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-idempotency: <x-idempotency>' \
--data '
{
"origin": "<string>",
"destination": "<string>",
"amount": "<string>",
"concept": "<string>",
"external_id": "<string>"
}
'import requests
url = "https://api.onepay.la/v1/customers/transfer"
payload = {
"origin": "<string>",
"destination": "<string>",
"amount": "<string>",
"concept": "<string>",
"external_id": "<string>"
}
headers = {
"x-idempotency": "<x-idempotency>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-idempotency': '<x-idempotency>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
origin: '<string>',
destination: '<string>',
amount: '<string>',
concept: '<string>',
external_id: '<string>'
})
};
fetch('https://api.onepay.la/v1/customers/transfer', 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/transfer",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'origin' => '<string>',
'destination' => '<string>',
'amount' => '<string>',
'concept' => '<string>',
'external_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-idempotency: <x-idempotency>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.onepay.la/v1/customers/transfer"
payload := strings.NewReader("{\n \"origin\": \"<string>\",\n \"destination\": \"<string>\",\n \"amount\": \"<string>\",\n \"concept\": \"<string>\",\n \"external_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-idempotency", "<x-idempotency>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.onepay.la/v1/customers/transfer")
.header("x-idempotency", "<x-idempotency>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"origin\": \"<string>\",\n \"destination\": \"<string>\",\n \"amount\": \"<string>\",\n \"concept\": \"<string>\",\n \"external_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onepay.la/v1/customers/transfer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-idempotency"] = '<x-idempotency>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"origin\": \"<string>\",\n \"destination\": \"<string>\",\n \"amount\": \"<string>\",\n \"concept\": \"<string>\",\n \"external_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "0194b9a9-45e4-73c5-8139-44d3813d8f29",
"type": "withdraw",
"amount": -1000,
"label": "$1.000",
"concept": "Prueba",
"subtype": "WALLET_TRANSFER",
"confirmed": true,
"node_type": null,
"created_at": "2025-01-31",
"external_id": "ref-001",
"node": null
}
{
"message": "No tienes fondos suficientes para hacer está operación, necesitas depositar fondos para continuar.",
"code": 10501,
"code_name": "insufficient_funds"
}
{
"message": "Registro no encontrado, Cliente no existe",
"code": 10002,
"code_name": "record_not_found"
}
{
"message": "No se puede generar la operación, genera un token de idempotencia y envíelo en los headers como x-idempotency",
"code": 10003,
"code_name": "idempotency_error"
}
Headers
string
required
Token único para garantizar la idempotencia de la petición
Body
string
required
Wallet ID de la billetera que enviará el dinero
string
required
Wallet ID de la billetera que recibirá el dinero
string
required
Monto a enviar
string
Descripción de la transacción
string
Identificador externo opcional (máx. 255 caracteres). Si lo envías, se guarda en la transacción y se devuelve tal cual en el webhook
wallet.transaction.created, lo que te permite correlacionar la transferencia con tus registros internos.{
"id": "0194b9a9-45e4-73c5-8139-44d3813d8f29",
"type": "withdraw",
"amount": -1000,
"label": "$1.000",
"concept": "Prueba",
"subtype": "WALLET_TRANSFER",
"confirmed": true,
"node_type": null,
"created_at": "2025-01-31",
"external_id": "ref-001",
"node": null
}
{
"message": "No tienes fondos suficientes para hacer está operación, necesitas depositar fondos para continuar.",
"code": 10501,
"code_name": "insufficient_funds"
}
{
"message": "Registro no encontrado, Cliente no existe",
"code": 10002,
"code_name": "record_not_found"
}
{
"message": "No se puede generar la operación, genera un token de idempotencia y envíelo en los headers como x-idempotency",
"code": 10003,
"code_name": "idempotency_error"
}
Was this page helpful?
⌘I