Crear transacción entrante (Chile)
curl --request POST \
--url https://hg.cash/api/v1/cl/transactions/inbound \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"paymentMethodId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"customer": {
"firstName": "<string>",
"lastName": "<string>",
"email": "jsmith@example.com",
"personalId": "<string>",
"ip": "<string>",
"city": "<string>",
"address": "<string>",
"zip": "<string>",
"phone": "<string>"
},
"description": "<string>",
"webhookUrl": "<string>",
"returnUrl": "<string>"
}
'import requests
url = "https://hg.cash/api/v1/cl/transactions/inbound"
payload = {
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"paymentMethodId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"customer": {
"firstName": "<string>",
"lastName": "<string>",
"email": "jsmith@example.com",
"personalId": "<string>",
"ip": "<string>",
"city": "<string>",
"address": "<string>",
"zip": "<string>",
"phone": "<string>"
},
"description": "<string>",
"webhookUrl": "<string>",
"returnUrl": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
accountId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
paymentMethodId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
amount: 123,
customer: {
firstName: '<string>',
lastName: '<string>',
email: 'jsmith@example.com',
personalId: '<string>',
ip: '<string>',
city: '<string>',
address: '<string>',
zip: '<string>',
phone: '<string>'
},
description: '<string>',
webhookUrl: '<string>',
returnUrl: '<string>'
})
};
fetch('https://hg.cash/api/v1/cl/transactions/inbound', 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://hg.cash/api/v1/cl/transactions/inbound",
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([
'accountId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'paymentMethodId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'amount' => 123,
'customer' => [
'firstName' => '<string>',
'lastName' => '<string>',
'email' => 'jsmith@example.com',
'personalId' => '<string>',
'ip' => '<string>',
'city' => '<string>',
'address' => '<string>',
'zip' => '<string>',
'phone' => '<string>'
],
'description' => '<string>',
'webhookUrl' => '<string>',
'returnUrl' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://hg.cash/api/v1/cl/transactions/inbound"
payload := strings.NewReader("{\n \"accountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"paymentMethodId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 123,\n \"customer\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"personalId\": \"<string>\",\n \"ip\": \"<string>\",\n \"city\": \"<string>\",\n \"address\": \"<string>\",\n \"zip\": \"<string>\",\n \"phone\": \"<string>\"\n },\n \"description\": \"<string>\",\n \"webhookUrl\": \"<string>\",\n \"returnUrl\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://hg.cash/api/v1/cl/transactions/inbound")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"accountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"paymentMethodId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 123,\n \"customer\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"personalId\": \"<string>\",\n \"ip\": \"<string>\",\n \"city\": \"<string>\",\n \"address\": \"<string>\",\n \"zip\": \"<string>\",\n \"phone\": \"<string>\"\n },\n \"description\": \"<string>\",\n \"webhookUrl\": \"<string>\",\n \"returnUrl\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hg.cash/api/v1/cl/transactions/inbound")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"accountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"paymentMethodId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 123,\n \"customer\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"personalId\": \"<string>\",\n \"ip\": \"<string>\",\n \"city\": \"<string>\",\n \"address\": \"<string>\",\n \"zip\": \"<string>\",\n \"phone\": \"<string>\"\n },\n \"description\": \"<string>\",\n \"webhookUrl\": \"<string>\",\n \"returnUrl\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"checkoutUrl": "<string>",
"status": "pending"
}{
"error": "<string>",
"code": "<string>",
"type": "<string>"
}Chile
Crear transacción entrante (Chile)
Crea una transacción entrante y recibe una URL de checkout hospedado.
La cuenta debe ser CLP de Chile. Inicia en pending hasta que se complete el pago.
POST
/
cl
/
transactions
/
inbound
Crear transacción entrante (Chile)
curl --request POST \
--url https://hg.cash/api/v1/cl/transactions/inbound \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"paymentMethodId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"customer": {
"firstName": "<string>",
"lastName": "<string>",
"email": "jsmith@example.com",
"personalId": "<string>",
"ip": "<string>",
"city": "<string>",
"address": "<string>",
"zip": "<string>",
"phone": "<string>"
},
"description": "<string>",
"webhookUrl": "<string>",
"returnUrl": "<string>"
}
'import requests
url = "https://hg.cash/api/v1/cl/transactions/inbound"
payload = {
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"paymentMethodId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"customer": {
"firstName": "<string>",
"lastName": "<string>",
"email": "jsmith@example.com",
"personalId": "<string>",
"ip": "<string>",
"city": "<string>",
"address": "<string>",
"zip": "<string>",
"phone": "<string>"
},
"description": "<string>",
"webhookUrl": "<string>",
"returnUrl": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
accountId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
paymentMethodId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
amount: 123,
customer: {
firstName: '<string>',
lastName: '<string>',
email: 'jsmith@example.com',
personalId: '<string>',
ip: '<string>',
city: '<string>',
address: '<string>',
zip: '<string>',
phone: '<string>'
},
description: '<string>',
webhookUrl: '<string>',
returnUrl: '<string>'
})
};
fetch('https://hg.cash/api/v1/cl/transactions/inbound', 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://hg.cash/api/v1/cl/transactions/inbound",
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([
'accountId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'paymentMethodId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'amount' => 123,
'customer' => [
'firstName' => '<string>',
'lastName' => '<string>',
'email' => 'jsmith@example.com',
'personalId' => '<string>',
'ip' => '<string>',
'city' => '<string>',
'address' => '<string>',
'zip' => '<string>',
'phone' => '<string>'
],
'description' => '<string>',
'webhookUrl' => '<string>',
'returnUrl' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://hg.cash/api/v1/cl/transactions/inbound"
payload := strings.NewReader("{\n \"accountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"paymentMethodId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 123,\n \"customer\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"personalId\": \"<string>\",\n \"ip\": \"<string>\",\n \"city\": \"<string>\",\n \"address\": \"<string>\",\n \"zip\": \"<string>\",\n \"phone\": \"<string>\"\n },\n \"description\": \"<string>\",\n \"webhookUrl\": \"<string>\",\n \"returnUrl\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://hg.cash/api/v1/cl/transactions/inbound")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"accountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"paymentMethodId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 123,\n \"customer\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"personalId\": \"<string>\",\n \"ip\": \"<string>\",\n \"city\": \"<string>\",\n \"address\": \"<string>\",\n \"zip\": \"<string>\",\n \"phone\": \"<string>\"\n },\n \"description\": \"<string>\",\n \"webhookUrl\": \"<string>\",\n \"returnUrl\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hg.cash/api/v1/cl/transactions/inbound")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"accountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"paymentMethodId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 123,\n \"customer\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"personalId\": \"<string>\",\n \"ip\": \"<string>\",\n \"city\": \"<string>\",\n \"address\": \"<string>\",\n \"zip\": \"<string>\",\n \"phone\": \"<string>\"\n },\n \"description\": \"<string>\",\n \"webhookUrl\": \"<string>\",\n \"returnUrl\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"checkoutUrl": "<string>",
"status": "pending"
}{
"error": "<string>",
"code": "<string>",
"type": "<string>"
}Autorizaciones
Token de autenticación de API de usuario con formato cash_<64-char-hex>. Valor de ejemplo cash_16cdc3b6f83c72d9d2680adca4f430962981f6bf32613a129dded0aa060387d2.
Cuerpo
application/json
Crear transacción entrante (checkout hospedado) para cuentas CLP de Chile
ID de GET /cl/payment-methods
Monto en CLP (p. ej. 100.50)
Show child attributes
Show child attributes
Opciones disponibles:
EN, ES, PT ⌘I

