Skip to main content
POST
/
transactions
/
transfer
Transfer
curl --request POST \
  --url https://api.lumx.io/transactions/transfer \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "currency": "USDC",
  "from": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "to": "980dc26b-42fd-4044-8a42-2271d20a2eb9",
  "amount": "10000.000000",
  "blockchain": "POLYGON",
  "metadata": {
    "orderId": "ord_789",
    "source": "checkout"
  }
}
'
import requests

url = "https://api.lumx.io/transactions/transfer"

payload = {
"currency": "USDC",
"from": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"to": "980dc26b-42fd-4044-8a42-2271d20a2eb9",
"amount": "10000.000000",
"blockchain": "POLYGON",
"metadata": {
"orderId": "ord_789",
"source": "checkout"
}
}
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({
currency: 'USDC',
from: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
to: '980dc26b-42fd-4044-8a42-2271d20a2eb9',
amount: '10000.000000',
blockchain: 'POLYGON',
metadata: {orderId: 'ord_789', source: 'checkout'}
})
};

fetch('https://api.lumx.io/transactions/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.lumx.io/transactions/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([
'currency' => 'USDC',
'from' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'to' => '980dc26b-42fd-4044-8a42-2271d20a2eb9',
'amount' => '10000.000000',
'blockchain' => 'POLYGON',
'metadata' => [
'orderId' => 'ord_789',
'source' => 'checkout'
]
]),
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://api.lumx.io/transactions/transfer"

payload := strings.NewReader("{\n \"currency\": \"USDC\",\n \"from\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"to\": \"980dc26b-42fd-4044-8a42-2271d20a2eb9\",\n \"amount\": \"10000.000000\",\n \"blockchain\": \"POLYGON\",\n \"metadata\": {\n \"orderId\": \"ord_789\",\n \"source\": \"checkout\"\n }\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://api.lumx.io/transactions/transfer")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"currency\": \"USDC\",\n \"from\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"to\": \"980dc26b-42fd-4044-8a42-2271d20a2eb9\",\n \"amount\": \"10000.000000\",\n \"blockchain\": \"POLYGON\",\n \"metadata\": {\n \"orderId\": \"ord_789\",\n \"source\": \"checkout\"\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.lumx.io/transactions/transfer")

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 \"currency\": \"USDC\",\n \"from\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"to\": \"980dc26b-42fd-4044-8a42-2271d20a2eb9\",\n \"amount\": \"10000.000000\",\n \"blockchain\": \"POLYGON\",\n \"metadata\": {\n \"orderId\": \"ord_789\",\n \"source\": \"checkout\"\n }\n}"

response = http.request(request)
puts response.read_body
{
  "id": "123e4567-e89b-12d3-a456-426614174004",
  "customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "type": "TRANSFER",
  "request": {
    "currency": "USDC",
    "from": "123e4567-e89b-12d3-a456-426614174001",
    "to": "123e4567-e89b-12d3-a456-426614174002",
    "amount": "1000.000000"
  },
  "state": {
    "status": "PENDING"
  },
  "metadata": {}
}

Authorizations

Authorization
string
header
required

Bearer authentication header on the format Bearer <API_KEY>.

Headers

Idempotency-Key
string<uuid>

Optional UUID v4 idempotency key. If you resend the same key with a different request body, the API returns a 409 error. Cached responses include the header X-Idempotency-Cached: true. Keys expire after 24 hours.

Body

application/json
currency
enum<string>
required

Transfer's currency.

Available options:
USDC,
USDT
Example:

"USDC"

from
string<uuid>
required

Customer's unique identifier that will send the funds.

Example:

"3c90c3cc-0d44-4b50-8888-8dd25736052a"

to
required

Customer's unique identifier that will receive the funds.

Example:

"980dc26b-42fd-4044-8a42-2271d20a2eb9"

amount
string
required

Transfer's amount.

Example:

"10000.000000"

blockchain
enum<string>

Target blockchain for the transaction. If not provided, the project's default blockchain will be used.

Available options:
ETHEREUM,
BASE,
TRON,
POLYGON
Example:

"POLYGON"

metadata
object

Optional metadata object to attach to the transaction. Accepts any valid JSON object.

Example:
{
"orderId": "ord_789",
"source": "checkout"
}

Response

202 - application/json

Transfer transaction started successfully.

id
string<uuid>

Transfer operation's unique identifier.

Example:

"123e4567-e89b-12d3-a456-426614174000"

customerId
string<uuid>

Customer's unique identifier.

Example:

"123e4567-e89b-12d3-a456-426614174000"

type
enum<string>

Transfer operation's type.

Available options:
TRANSFER
Example:

"TRANSFER"

request
object
state
object

Transfer operation's current state. See examples for more details.

metadata
object

Metadata object attached to the transaction.

Example:
{
"orderId": "ord_789",
"source": "checkout"
}
createdAt
string<date-time>

Creation date and time (UTC).

Example:

"2024-03-20T15:30:00Z"

updatedAt
string<date-time>

Last update date and time (UTC).

Example:

"2024-03-20T15:30:05Z"