Prepare Order for Funding
curl --request POST \
--url https://api.chessa.ai/v1/orders/funding \
--header 'Content-Type: application/json' \
--data '
{
"chain": "Solana",
"notes": "Additional comments for the payment",
"orderId": "9b9d0383-20e1-48ef-bf08-57a26c63807e"
}
'import requests
url = "https://api.chessa.ai/v1/orders/funding"
payload = {
"chain": "Solana",
"notes": "Additional comments for the payment",
"orderId": "9b9d0383-20e1-48ef-bf08-57a26c63807e"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
chain: 'Solana',
notes: 'Additional comments for the payment',
orderId: '9b9d0383-20e1-48ef-bf08-57a26c63807e'
})
};
fetch('https://api.chessa.ai/v1/orders/funding', 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.chessa.ai/v1/orders/funding",
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([
'chain' => 'Solana',
'notes' => 'Additional comments for the payment',
'orderId' => '9b9d0383-20e1-48ef-bf08-57a26c63807e'
]),
CURLOPT_HTTPHEADER => [
"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.chessa.ai/v1/orders/funding"
payload := strings.NewReader("{\n \"chain\": \"Solana\",\n \"notes\": \"Additional comments for the payment\",\n \"orderId\": \"9b9d0383-20e1-48ef-bf08-57a26c63807e\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.chessa.ai/v1/orders/funding")
.header("Content-Type", "application/json")
.body("{\n \"chain\": \"Solana\",\n \"notes\": \"Additional comments for the payment\",\n \"orderId\": \"9b9d0383-20e1-48ef-bf08-57a26c63807e\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chessa.ai/v1/orders/funding")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"chain\": \"Solana\",\n \"notes\": \"Additional comments for the payment\",\n \"orderId\": \"9b9d0383-20e1-48ef-bf08-57a26c63807e\"\n}"
response = http.request(request)
puts response.read_body{
"order": {
"createdAt": "2025-03-18T06:05:27.754Z",
"cryptoAddress": "5u1gLZrAiyw6yAyYx3N6D916CUqEcoTkwvF54QwDGzRn",
"cryptoAddressChain": "Solana",
"cryptoAddressId": "74b62929-47f4-43f9-a4dc-a987deaff799",
"cryptoAddressTag": "",
"cryptoDepositId": null,
"destinationAmount": "1500.00000000",
"destinationAsset": "NGN",
"destinationCountry": "NG",
"expiresAt": "2025-03-18T08:05:27.751Z",
"feeAmount": "0.00000000",
"feeCurrency": "USDC",
"feeUsd": "0.00000000",
"id": "b647214f-3c33-4027-986b-3a46f041e800",
"note": null,
"originAmount": "0.95000000",
"originAsset": "USDC",
"partnerId": "4646e61e-33cf-452b-8bba-c138b78a57f0",
"recipientId": "f12b990c-d4dc-4dc7-8b42-cbaa90308820",
"refundAddress": null,
"senderConfirmedAt": null,
"shortId": "N3LBXEUI",
"status": "waiting_for_funding",
"updatedAt": "2025-03-18T06:06:46.500Z",
"userId": "02e31a45-9474-4858-a833-06e89e494003"
}
}{
"error": "validation_error",
"message": "Invalid chain specified",
"statusCode": 400
}{
"error": "not_found",
"message": "Order not found",
"statusCode": 404
}Orders
Prepare Order for Funding
Prepare an order for funding. This updates the order with the cryptoAddress
The order is ready to be paid, and once funds are received, the order will automatically complete.
POST
/
v1
/
orders
/
funding
Prepare Order for Funding
curl --request POST \
--url https://api.chessa.ai/v1/orders/funding \
--header 'Content-Type: application/json' \
--data '
{
"chain": "Solana",
"notes": "Additional comments for the payment",
"orderId": "9b9d0383-20e1-48ef-bf08-57a26c63807e"
}
'import requests
url = "https://api.chessa.ai/v1/orders/funding"
payload = {
"chain": "Solana",
"notes": "Additional comments for the payment",
"orderId": "9b9d0383-20e1-48ef-bf08-57a26c63807e"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
chain: 'Solana',
notes: 'Additional comments for the payment',
orderId: '9b9d0383-20e1-48ef-bf08-57a26c63807e'
})
};
fetch('https://api.chessa.ai/v1/orders/funding', 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.chessa.ai/v1/orders/funding",
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([
'chain' => 'Solana',
'notes' => 'Additional comments for the payment',
'orderId' => '9b9d0383-20e1-48ef-bf08-57a26c63807e'
]),
CURLOPT_HTTPHEADER => [
"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.chessa.ai/v1/orders/funding"
payload := strings.NewReader("{\n \"chain\": \"Solana\",\n \"notes\": \"Additional comments for the payment\",\n \"orderId\": \"9b9d0383-20e1-48ef-bf08-57a26c63807e\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.chessa.ai/v1/orders/funding")
.header("Content-Type", "application/json")
.body("{\n \"chain\": \"Solana\",\n \"notes\": \"Additional comments for the payment\",\n \"orderId\": \"9b9d0383-20e1-48ef-bf08-57a26c63807e\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chessa.ai/v1/orders/funding")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"chain\": \"Solana\",\n \"notes\": \"Additional comments for the payment\",\n \"orderId\": \"9b9d0383-20e1-48ef-bf08-57a26c63807e\"\n}"
response = http.request(request)
puts response.read_body{
"order": {
"createdAt": "2025-03-18T06:05:27.754Z",
"cryptoAddress": "5u1gLZrAiyw6yAyYx3N6D916CUqEcoTkwvF54QwDGzRn",
"cryptoAddressChain": "Solana",
"cryptoAddressId": "74b62929-47f4-43f9-a4dc-a987deaff799",
"cryptoAddressTag": "",
"cryptoDepositId": null,
"destinationAmount": "1500.00000000",
"destinationAsset": "NGN",
"destinationCountry": "NG",
"expiresAt": "2025-03-18T08:05:27.751Z",
"feeAmount": "0.00000000",
"feeCurrency": "USDC",
"feeUsd": "0.00000000",
"id": "b647214f-3c33-4027-986b-3a46f041e800",
"note": null,
"originAmount": "0.95000000",
"originAsset": "USDC",
"partnerId": "4646e61e-33cf-452b-8bba-c138b78a57f0",
"recipientId": "f12b990c-d4dc-4dc7-8b42-cbaa90308820",
"refundAddress": null,
"senderConfirmedAt": null,
"shortId": "N3LBXEUI",
"status": "waiting_for_funding",
"updatedAt": "2025-03-18T06:06:46.500Z",
"userId": "02e31a45-9474-4858-a833-06e89e494003"
}
}{
"error": "validation_error",
"message": "Invalid chain specified",
"statusCode": 400
}{
"error": "not_found",
"message": "Order not found",
"statusCode": 404
}Was this page helpful?