Note You can use payment-attempts or create the payment directly.
A COLLECT transaction allows you to gather funds from multiple accounts into a single destination account. It is commonly used for pooling money, collecting shared payments, or consolidating balances from multiple users.
01 Select origins Choose the accounts that contribute funds.
02 Set amounts Assign an amount to each origin and match the total.
03 Choose destination Route the collected funds into one account.
04 Capture Commit the internal movement.
Create payment Creates a collect transaction specifying multiple origins , each with its own amount, and a single destination .
Request HTTP curl JavaScript Python Go Rust
POST /sandbox/payments HTTP / 1.1
Host: api.conomyhq.com
x-api-key: {YOUR_API_KEY}
Authorization: Bearer {ACCESS_TOKEN}
conomyhq-api-version: 24-04-2025
User-Agent: MyApp/1.0
Content-Type: application/json
Accept: application/json
{
" externalId " : " payment-id-12345 " ,
" identityId " : " 67f21a61d6d09fcbb4e84631 " ,
" accountNumber " : " 1743919714051743919010211 " ,
" totalAmount " : " 30000.00 " ,
" currency " : " COP " ,
" product " : " COP:COP " ,
" type " : " COLLECT " ,
" purchaseAmount " : " 30000.00 " ,
" purchaseCurrency " : " COP " ,
" origins " : [
{
" type " : " ACCOUNT " ,
" amount " : " 15000.00 " ,
" currency " : " COP " ,
" identity " : {
" identityId " : " 67f21d17d6d09fcbb4e84632 "
},
" account " : {
" accountNumber " : " 17439204080520250406060905072 "
}
},
{
" type " : " ACCOUNT " ,
" amount " : " 15000.00 " ,
" currency " : " COP " ,
" identity " : {
" identityId " : " 67f21a61d6d09fcbb4e84631 "
},
" account " : {
" accountNumber " : " 1743919714051743919010211 "
}
}
],
" destinations " : [
{
" type " : " ACCOUNT " ,
" amount " : " 30000.00 " ,
" currency " : " COP " ,
" identity " : {
" identityId " : " 67f21a61d6d09fcbb4e84631 "
},
" account " : {
" accountNumber " : " 1743919714051743919010211 "
}
}
]
} curl -X POST ' https://api.conomyhq.com/sandbox/payments ' \
-H ' x-api-key: {YOUR_API_KEY} ' \
-H ' Authorization: Bearer {ACCESS_TOKEN} ' \
-H ' conomyhq-api-version: 24-04-2025 ' \
-H ' User-Agent: MyApp/1.0 ' \
-H ' Content-Type: application/json ' \
-H ' Accept: application/json ' \
-d ' {
"externalId": "payment-id-12345",
"identityId": "67f21a61d6d09fcbb4e84631",
"accountNumber": "1743919714051743919010211",
"totalAmount": "30000.00",
"currency": "COP",
"product": "COP:COP",
"type": "COLLECT",
"purchaseAmount": "30000.00",
"purchaseCurrency": "COP",
"origins": [
{
"type": "ACCOUNT",
"amount": "15000.00",
"currency": "COP",
"identity": {
"identityId": "67f21d17d6d09fcbb4e84632"
},
"account": {
"accountNumber": "17439204080520250406060905072"
}
},
{
"type": "ACCOUNT",
"amount": "15000.00",
"currency": "COP",
"identity": {
"identityId": "67f21a61d6d09fcbb4e84631"
},
"account": {
"accountNumber": "1743919714051743919010211"
}
}
],
"destinations": [
{
"type": "ACCOUNT",
"amount": "30000.00",
"currency": "COP",
"identity": {
"identityId": "67f21a61d6d09fcbb4e84631"
},
"account": {
"accountNumber": "1743919714051743919010211"
}
}
]
} ' const response = await fetch ( ' https://api.conomyhq.com/sandbox/payments ' , {
method : ' POST ' ,
headers : {
' x-api-key ' : ' {YOUR_API_KEY} ' ,
' Authorization ' : ' Bearer {ACCESS_TOKEN} ' ,
' conomyhq-api-version ' : ' 24-04-2025 ' ,
' User-Agent ' : ' MyApp/1.0 ' ,
' Content-Type ' : ' application/json ' ,
' Accept ' : ' application/json ' ,
},
body : JSON . stringify ({
" externalId " : " payment-id-12345 " ,
" identityId " : " 67f21a61d6d09fcbb4e84631 " ,
" accountNumber " : " 1743919714051743919010211 " ,
" totalAmount " : " 30000.00 " ,
" currency " : " COP " ,
" product " : " COP:COP " ,
" type " : " COLLECT " ,
" purchaseAmount " : " 30000.00 " ,
" purchaseCurrency " : " COP " ,
" origins " : [
{
" type " : " ACCOUNT " ,
" amount " : " 15000.00 " ,
" currency " : " COP " ,
" identity " : {
" identityId " : " 67f21d17d6d09fcbb4e84632 "
},
" account " : {
" accountNumber " : " 17439204080520250406060905072 "
}
},
{
" type " : " ACCOUNT " ,
" amount " : " 15000.00 " ,
" currency " : " COP " ,
" identity " : {
" identityId " : " 67f21a61d6d09fcbb4e84631 "
},
" account " : {
" accountNumber " : " 1743919714051743919010211 "
}
}
],
" destinations " : [
{
" type " : " ACCOUNT " ,
" amount " : " 30000.00 " ,
" currency " : " COP " ,
" identity " : {
" identityId " : " 67f21a61d6d09fcbb4e84631 "
},
" account " : {
" accountNumber " : " 1743919714051743919010211 "
}
}
]
}),
});
const data = await response . json (); import requests
payload = {
" externalId " : " payment-id-12345 " ,
" identityId " : " 67f21a61d6d09fcbb4e84631 " ,
" accountNumber " : " 1743919714051743919010211 " ,
" totalAmount " : " 30000.00 " ,
" currency " : " COP " ,
" product " : " COP:COP " ,
" type " : " COLLECT " ,
" purchaseAmount " : " 30000.00 " ,
" purchaseCurrency " : " COP " ,
" origins " : [
{
" type " : " ACCOUNT " ,
" amount " : " 15000.00 " ,
" currency " : " COP " ,
" identity " : {
" identityId " : " 67f21d17d6d09fcbb4e84632 "
},
" account " : {
" accountNumber " : " 17439204080520250406060905072 "
}
},
{
" type " : " ACCOUNT " ,
" amount " : " 15000.00 " ,
" currency " : " COP " ,
" identity " : {
" identityId " : " 67f21a61d6d09fcbb4e84631 "
},
" account " : {
" accountNumber " : " 1743919714051743919010211 "
}
}
],
" destinations " : [
{
" type " : " ACCOUNT " ,
" amount " : " 30000.00 " ,
" currency " : " COP " ,
" identity " : {
" identityId " : " 67f21a61d6d09fcbb4e84631 "
},
" account " : {
" accountNumber " : " 1743919714051743919010211 "
}
}
]
}
response = requests . post (
' https://api.conomyhq.com/sandbox/payments ' ,
headers ={
' x-api-key ' : ' {YOUR_API_KEY} ' ,
' Authorization ' : ' Bearer {ACCESS_TOKEN} ' ,
' conomyhq-api-version ' : ' 24-04-2025 ' ,
' User-Agent ' : ' MyApp/1.0 ' ,
' Content-Type ' : ' application/json ' ,
' Accept ' : ' application/json ' ,
},
json = payload ,
)
data = response . json () package main
import (
" bytes "
" net/http "
)
func main () {
payload := [] byte ( ` {
"externalId": "payment-id-12345",
"identityId": "67f21a61d6d09fcbb4e84631",
"accountNumber": "1743919714051743919010211",
"totalAmount": "30000.00",
"currency": "COP",
"product": "COP:COP",
"type": "COLLECT",
"purchaseAmount": "30000.00",
"purchaseCurrency": "COP",
"origins": [
{
"type": "ACCOUNT",
"amount": "15000.00",
"currency": "COP",
"identity": {
"identityId": "67f21d17d6d09fcbb4e84632"
},
"account": {
"accountNumber": "17439204080520250406060905072"
}
},
{
"type": "ACCOUNT",
"amount": "15000.00",
"currency": "COP",
"identity": {
"identityId": "67f21a61d6d09fcbb4e84631"
},
"account": {
"accountNumber": "1743919714051743919010211"
}
}
],
"destinations": [
{
"type": "ACCOUNT",
"amount": "30000.00",
"currency": "COP",
"identity": {
"identityId": "67f21a61d6d09fcbb4e84631"
},
"account": {
"accountNumber": "1743919714051743919010211"
}
}
]
} ` )
body := bytes . NewReader ( payload )
req , _ := http . NewRequest ( " POST " , " https://api.conomyhq.com/sandbox/payments " , body )
req . Header . Set ( " x-api-key " , " {YOUR_API_KEY} " )
req . Header . Set ( " Authorization " , " Bearer {ACCESS_TOKEN} " )
req . Header . Set ( " conomyhq-api-version " , " 24-04-2025 " )
req . Header . Set ( " User-Agent " , " MyApp/1.0 " )
req . Header . Set ( " Content-Type " , " application/json " )
req . Header . Set ( " Accept " , " application/json " )
client := & http . Client {}
resp , _ := client . Do ( req )
defer resp . Body . Close ()
} use reqwest :: Client ;
use serde_json :: json ;
#[ tokio :: main ]
async fn main () -> Result <(), Box < dyn std :: error :: Error >> {
let client = Client :: new ();
let payload = json! ({
" externalId " : " payment-id-12345 " ,
" identityId " : " 67f21a61d6d09fcbb4e84631 " ,
" accountNumber " : " 1743919714051743919010211 " ,
" totalAmount " : " 30000.00 " ,
" currency " : " COP " ,
" product " : " COP:COP " ,
" type " : " COLLECT " ,
" purchaseAmount " : " 30000.00 " ,
" purchaseCurrency " : " COP " ,
" origins " : [
{
" type " : " ACCOUNT " ,
" amount " : " 15000.00 " ,
" currency " : " COP " ,
" identity " : {
" identityId " : " 67f21d17d6d09fcbb4e84632 "
},
" account " : {
" accountNumber " : " 17439204080520250406060905072 "
}
},
{
" type " : " ACCOUNT " ,
" amount " : " 15000.00 " ,
" currency " : " COP " ,
" identity " : {
" identityId " : " 67f21a61d6d09fcbb4e84631 "
},
" account " : {
" accountNumber " : " 1743919714051743919010211 "
}
}
],
" destinations " : [
{
" type " : " ACCOUNT " ,
" amount " : " 30000.00 " ,
" currency " : " COP " ,
" identity " : {
" identityId " : " 67f21a61d6d09fcbb4e84631 "
},
" account " : {
" accountNumber " : " 1743919714051743919010211 "
}
}
]
});
let response = client
. post ( " https://api.conomyhq.com/sandbox/payments " )
. header ( " x-api-key " , " { YOUR_API_KEY } " )
. header ( " Authorization " , " Bearer { ACCESS_TOKEN } " )
. header ( " conomyhq-api-version " , " 24-04-2025 " )
. header ( " User-Agent " , " MyApp/1.0 " )
. header ( " Content-Type " , " application/json " )
. header ( " Accept " , " application/json " )
. json ( & payload )
. send ()
. await ? ;
let data : serde_json :: Value = response . json () . await ? ;
Ok (())
} {
" id " : " <PAYMENT_ID> " ,
" type " : " COLLECT " ,
" status " : " CREATED "
}
Capture payment Captures the collected funds, finalizing the transaction once all origins have been committed.
Request HTTP curl JavaScript Python Go Rust
POST /sandbox/payments/{PAYMENT_ID}/captured HTTP / 1.1
Host: api.conomyhq.com
x-api-key: {YOUR_API_KEY}
Authorization: Bearer {ACCESS_TOKEN}
conomyhq-api-version: 24-04-2025
User-Agent: MyApp/1.0
Accept: application/json curl -X POST ' https://api.conomyhq.com/sandbox/payments/{PAYMENT_ID}/captured ' \
-H ' x-api-key: {YOUR_API_KEY} ' \
-H ' Authorization: Bearer {ACCESS_TOKEN} ' \
-H ' conomyhq-api-version: 24-04-2025 ' \
-H ' User-Agent: MyApp/1.0 ' \
-H ' Accept: application/json ' const response = await fetch ( ' https://api.conomyhq.com/sandbox/payments/{PAYMENT_ID}/captured ' , {
method : ' POST ' ,
headers : {
' x-api-key ' : ' {YOUR_API_KEY} ' ,
' Authorization ' : ' Bearer {ACCESS_TOKEN} ' ,
' conomyhq-api-version ' : ' 24-04-2025 ' ,
' User-Agent ' : ' MyApp/1.0 ' ,
' Accept ' : ' application/json ' ,
},
});
const data = await response . json (); import requests
response = requests . post (
' https://api.conomyhq.com/sandbox/payments/ {PAYMENT_ID} /captured ' ,
headers ={
' x-api-key ' : ' {YOUR_API_KEY} ' ,
' Authorization ' : ' Bearer {ACCESS_TOKEN} ' ,
' conomyhq-api-version ' : ' 24-04-2025 ' ,
' User-Agent ' : ' MyApp/1.0 ' ,
' Accept ' : ' application/json ' ,
},
)
data = response . json () package main
import (
" net/http "
)
func main () {
req , _ := http . NewRequest ( " POST " , " https://api.conomyhq.com/sandbox/payments/{PAYMENT_ID}/captured " , nil )
req . Header . Set ( " x-api-key " , " {YOUR_API_KEY} " )
req . Header . Set ( " Authorization " , " Bearer {ACCESS_TOKEN} " )
req . Header . Set ( " conomyhq-api-version " , " 24-04-2025 " )
req . Header . Set ( " User-Agent " , " MyApp/1.0 " )
req . Header . Set ( " Accept " , " application/json " )
client := & http . Client {}
resp , _ := client . Do ( req )
defer resp . Body . Close ()
} use reqwest :: Client ;
#[ tokio :: main ]
async fn main () -> Result <(), Box < dyn std :: error :: Error >> {
let client = Client :: new ();
let response = client
. post ( " https://api.conomyhq.com/sandbox/payments/ { PAYMENT_ID } /captured " )
. header ( " x-api-key " , " { YOUR_API_KEY } " )
. header ( " Authorization " , " Bearer { ACCESS_TOKEN } " )
. header ( " conomyhq-api-version " , " 24-04-2025 " )
. header ( " User-Agent " , " MyApp/1.0 " )
. header ( " Accept " , " application/json " )
. send ()
. await ? ;
let data : serde_json :: Value = response . json () . await ? ;
Ok (())
} {
" id " : " <PAYMENT_ID> " ,
" status " : " CAPTURED "
}
Webhook simulation Simulate the receipt confirmation of a collect payment.
Request HTTP curl JavaScript Python Go Rust
POST /sandboxwebhook/payments/received/payment-provider HTTP / 1.1
Host: api.conomyhq.com
x-api-key: {YOUR_API_KEY}
Authorization: Bearer {ACCESS_TOKEN}
conomyhq-api-version: 24-04-2025
User-Agent: MyApp/1.0
Content-Type: application/json
Accept: application/json
{
" id " : " <PAYMENT_ID> "
} curl -X POST ' https://api.conomyhq.com/sandboxwebhook/payments/received/payment-provider ' \
-H ' x-api-key: {YOUR_API_KEY} ' \
-H ' Authorization: Bearer {ACCESS_TOKEN} ' \
-H ' conomyhq-api-version: 24-04-2025 ' \
-H ' User-Agent: MyApp/1.0 ' \
-H ' Content-Type: application/json ' \
-H ' Accept: application/json ' \
-d ' {
"id": "<PAYMENT_ID>"
} ' const response = await fetch ( ' https://api.conomyhq.com/sandboxwebhook/payments/received/payment-provider ' , {
method : ' POST ' ,
headers : {
' x-api-key ' : ' {YOUR_API_KEY} ' ,
' Authorization ' : ' Bearer {ACCESS_TOKEN} ' ,
' conomyhq-api-version ' : ' 24-04-2025 ' ,
' User-Agent ' : ' MyApp/1.0 ' ,
' Content-Type ' : ' application/json ' ,
' Accept ' : ' application/json ' ,
},
body : JSON . stringify ({
" id " : " <PAYMENT_ID> "
}),
});
const data = await response . json (); import requests
payload = {
" id " : " <PAYMENT_ID> "
}
response = requests . post (
' https://api.conomyhq.com/sandboxwebhook/payments/received/payment-provider ' ,
headers ={
' x-api-key ' : ' {YOUR_API_KEY} ' ,
' Authorization ' : ' Bearer {ACCESS_TOKEN} ' ,
' conomyhq-api-version ' : ' 24-04-2025 ' ,
' User-Agent ' : ' MyApp/1.0 ' ,
' Content-Type ' : ' application/json ' ,
' Accept ' : ' application/json ' ,
},
json = payload ,
)
data = response . json () package main
import (
" bytes "
" net/http "
)
func main () {
payload := [] byte ( ` {
"id": "<PAYMENT_ID>"
} ` )
body := bytes . NewReader ( payload )
req , _ := http . NewRequest ( " POST " , " https://api.conomyhq.com/sandboxwebhook/payments/received/payment-provider " , body )
req . Header . Set ( " x-api-key " , " {YOUR_API_KEY} " )
req . Header . Set ( " Authorization " , " Bearer {ACCESS_TOKEN} " )
req . Header . Set ( " conomyhq-api-version " , " 24-04-2025 " )
req . Header . Set ( " User-Agent " , " MyApp/1.0 " )
req . Header . Set ( " Content-Type " , " application/json " )
req . Header . Set ( " Accept " , " application/json " )
client := & http . Client {}
resp , _ := client . Do ( req )
defer resp . Body . Close ()
} use reqwest :: Client ;
use serde_json :: json ;
#[ tokio :: main ]
async fn main () -> Result <(), Box < dyn std :: error :: Error >> {
let client = Client :: new ();
let payload = json! ({
" id " : " <PAYMENT_ID> "
});
let response = client
. post ( " https://api.conomyhq.com/sandboxwebhook/payments/received/payment-provider " )
. header ( " x-api-key " , " { YOUR_API_KEY } " )
. header ( " Authorization " , " Bearer { ACCESS_TOKEN } " )
. header ( " conomyhq-api-version " , " 24-04-2025 " )
. header ( " User-Agent " , " MyApp/1.0 " )
. header ( " Content-Type " , " application/json " )
. header ( " Accept " , " application/json " )
. json ( & payload )
. send ()
. await ? ;
let data : serde_json :: Value = response . json () . await ? ;
Ok (())
}
Check Account information Confirm the destination account where funds are being consolidated.
Request HTTP curl JavaScript Python Go Rust
GET /sandbox/accounts?accountNumber=1743919714051743919010211 HTTP / 1.1
Host: api.conomyhq.com
x-api-key: {YOUR_API_KEY}
Authorization: Bearer {ACCESS_TOKEN}
conomyhq-api-version: 24-04-2025
User-Agent: MyApp/1.0
Accept: application/json curl -X GET ' https://api.conomyhq.com/sandbox/accounts?accountNumber=1743919714051743919010211 ' \
-H ' x-api-key: {YOUR_API_KEY} ' \
-H ' Authorization: Bearer {ACCESS_TOKEN} ' \
-H ' conomyhq-api-version: 24-04-2025 ' \
-H ' User-Agent: MyApp/1.0 ' \
-H ' Accept: application/json ' const response = await fetch ( ' https://api.conomyhq.com/sandbox/accounts?accountNumber=1743919714051743919010211 ' , {
method : ' GET ' ,
headers : {
' x-api-key ' : ' {YOUR_API_KEY} ' ,
' Authorization ' : ' Bearer {ACCESS_TOKEN} ' ,
' conomyhq-api-version ' : ' 24-04-2025 ' ,
' User-Agent ' : ' MyApp/1.0 ' ,
' Accept ' : ' application/json ' ,
},
});
const data = await response . json (); import requests
response = requests . get (
' https://api.conomyhq.com/sandbox/accounts?accountNumber=1743919714051743919010211 ' ,
headers ={
' x-api-key ' : ' {YOUR_API_KEY} ' ,
' Authorization ' : ' Bearer {ACCESS_TOKEN} ' ,
' conomyhq-api-version ' : ' 24-04-2025 ' ,
' User-Agent ' : ' MyApp/1.0 ' ,
' Accept ' : ' application/json ' ,
},
)
data = response . json () package main
import (
" net/http "
)
func main () {
req , _ := http . NewRequest ( " GET " , " https://api.conomyhq.com/sandbox/accounts?accountNumber=1743919714051743919010211 " , nil )
req . Header . Set ( " x-api-key " , " {YOUR_API_KEY} " )
req . Header . Set ( " Authorization " , " Bearer {ACCESS_TOKEN} " )
req . Header . Set ( " conomyhq-api-version " , " 24-04-2025 " )
req . Header . Set ( " User-Agent " , " MyApp/1.0 " )
req . Header . Set ( " Accept " , " application/json " )
client := & http . Client {}
resp , _ := client . Do ( req )
defer resp . Body . Close ()
} use reqwest :: Client ;
#[ tokio :: main ]
async fn main () -> Result <(), Box < dyn std :: error :: Error >> {
let client = Client :: new ();
let response = client
. get ( " https://api.conomyhq.com/sandbox/accounts?accountNumber=1743919714051743919010211 " )
. header ( " x-api-key " , " { YOUR_API_KEY } " )
. header ( " Authorization " , " Bearer { ACCESS_TOKEN } " )
. header ( " conomyhq-api-version " , " 24-04-2025 " )
. header ( " User-Agent " , " MyApp/1.0 " )
. header ( " Accept " , " application/json " )
. send ()
. await ? ;
let data : serde_json :: Value = response . json () . await ? ;
Ok (())
} {
" id " : " <ACCOUNT_ID> " ,
" accountNumber " : " 1743919714051743919010211 " ,
" availableFunds " : " 30000.00 " ,
" currency " : " COP " ,
" status " : " ACTIVE "
}