curl --request POST \
--url https://grid.squads.xyz/api/grid/v1/accounts/{address}/payment-intents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-grid-environment: <x-grid-environment>' \
--data '
{
"amount": "100000000",
"destination": {
"currency": "USD",
"external_account_id": "6f4f23d5-5ca8-4c62-92f8-9d730f89adf4",
"payment_rail": "SWIFT",
"reference": "Invoice #2026-001"
},
"source": {
"currency": "USDC",
"payment_rail": "SOLANA",
"account_id": "ewa_abc123"
},
"client_reference_id": "invoice-2026-001",
"document_ids": [
"doc_abc123"
],
"fees": {
"developer_fee_fixed": 10000,
"developer_fee_percent": 0.015
},
"memo": "Invoice #2026-001",
"mode": "destination_address",
"payment_reason": "PAYMENT_FOR_GOODS_AND_SERVICES",
"remarks": "Payable for March settlement"
}
'import requests
url = "https://grid.squads.xyz/api/grid/v1/accounts/{address}/payment-intents"
payload = {
"amount": "100000000",
"destination": {
"currency": "USD",
"external_account_id": "6f4f23d5-5ca8-4c62-92f8-9d730f89adf4",
"payment_rail": "SWIFT",
"reference": "Invoice #2026-001"
},
"source": {
"currency": "USDC",
"payment_rail": "SOLANA",
"account_id": "ewa_abc123"
},
"client_reference_id": "invoice-2026-001",
"document_ids": ["doc_abc123"],
"fees": {
"developer_fee_fixed": 10000,
"developer_fee_percent": 0.015
},
"memo": "Invoice #2026-001",
"mode": "destination_address",
"payment_reason": "PAYMENT_FOR_GOODS_AND_SERVICES",
"remarks": "Payable for March settlement"
}
headers = {
"x-grid-environment": "<x-grid-environment>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-grid-environment': '<x-grid-environment>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: '100000000',
destination: {
currency: 'USD',
external_account_id: '6f4f23d5-5ca8-4c62-92f8-9d730f89adf4',
payment_rail: 'SWIFT',
reference: 'Invoice #2026-001'
},
source: {currency: 'USDC', payment_rail: 'SOLANA', account_id: 'ewa_abc123'},
client_reference_id: 'invoice-2026-001',
document_ids: ['doc_abc123'],
fees: {developer_fee_fixed: 10000, developer_fee_percent: 0.015},
memo: 'Invoice #2026-001',
mode: 'destination_address',
payment_reason: 'PAYMENT_FOR_GOODS_AND_SERVICES',
remarks: 'Payable for March settlement'
})
};
fetch('https://grid.squads.xyz/api/grid/v1/accounts/{address}/payment-intents', 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://grid.squads.xyz/api/grid/v1/accounts/{address}/payment-intents",
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([
'amount' => '100000000',
'destination' => [
'currency' => 'USD',
'external_account_id' => '6f4f23d5-5ca8-4c62-92f8-9d730f89adf4',
'payment_rail' => 'SWIFT',
'reference' => 'Invoice #2026-001'
],
'source' => [
'currency' => 'USDC',
'payment_rail' => 'SOLANA',
'account_id' => 'ewa_abc123'
],
'client_reference_id' => 'invoice-2026-001',
'document_ids' => [
'doc_abc123'
],
'fees' => [
'developer_fee_fixed' => 10000,
'developer_fee_percent' => 0.015
],
'memo' => 'Invoice #2026-001',
'mode' => 'destination_address',
'payment_reason' => 'PAYMENT_FOR_GOODS_AND_SERVICES',
'remarks' => 'Payable for March settlement'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-grid-environment: <x-grid-environment>"
],
]);
$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://grid.squads.xyz/api/grid/v1/accounts/{address}/payment-intents"
payload := strings.NewReader("{\n \"amount\": \"100000000\",\n \"destination\": {\n \"currency\": \"USD\",\n \"external_account_id\": \"6f4f23d5-5ca8-4c62-92f8-9d730f89adf4\",\n \"payment_rail\": \"SWIFT\",\n \"reference\": \"Invoice #2026-001\"\n },\n \"source\": {\n \"currency\": \"USDC\",\n \"payment_rail\": \"SOLANA\",\n \"account_id\": \"ewa_abc123\"\n },\n \"client_reference_id\": \"invoice-2026-001\",\n \"document_ids\": [\n \"doc_abc123\"\n ],\n \"fees\": {\n \"developer_fee_fixed\": 10000,\n \"developer_fee_percent\": 0.015\n },\n \"memo\": \"Invoice #2026-001\",\n \"mode\": \"destination_address\",\n \"payment_reason\": \"PAYMENT_FOR_GOODS_AND_SERVICES\",\n \"remarks\": \"Payable for March settlement\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-grid-environment", "<x-grid-environment>")
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://grid.squads.xyz/api/grid/v1/accounts/{address}/payment-intents")
.header("x-grid-environment", "<x-grid-environment>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"100000000\",\n \"destination\": {\n \"currency\": \"USD\",\n \"external_account_id\": \"6f4f23d5-5ca8-4c62-92f8-9d730f89adf4\",\n \"payment_rail\": \"SWIFT\",\n \"reference\": \"Invoice #2026-001\"\n },\n \"source\": {\n \"currency\": \"USDC\",\n \"payment_rail\": \"SOLANA\",\n \"account_id\": \"ewa_abc123\"\n },\n \"client_reference_id\": \"invoice-2026-001\",\n \"document_ids\": [\n \"doc_abc123\"\n ],\n \"fees\": {\n \"developer_fee_fixed\": 10000,\n \"developer_fee_percent\": 0.015\n },\n \"memo\": \"Invoice #2026-001\",\n \"mode\": \"destination_address\",\n \"payment_reason\": \"PAYMENT_FOR_GOODS_AND_SERVICES\",\n \"remarks\": \"Payable for March settlement\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://grid.squads.xyz/api/grid/v1/accounts/{address}/payment-intents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-grid-environment"] = '<x-grid-environment>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"100000000\",\n \"destination\": {\n \"currency\": \"USD\",\n \"external_account_id\": \"6f4f23d5-5ca8-4c62-92f8-9d730f89adf4\",\n \"payment_rail\": \"SWIFT\",\n \"reference\": \"Invoice #2026-001\"\n },\n \"source\": {\n \"currency\": \"USDC\",\n \"payment_rail\": \"SOLANA\",\n \"account_id\": \"ewa_abc123\"\n },\n \"client_reference_id\": \"invoice-2026-001\",\n \"document_ids\": [\n \"doc_abc123\"\n ],\n \"fees\": {\n \"developer_fee_fixed\": 10000,\n \"developer_fee_percent\": 0.015\n },\n \"memo\": \"Invoice #2026-001\",\n \"mode\": \"destination_address\",\n \"payment_reason\": \"PAYMENT_FOR_GOODS_AND_SERVICES\",\n \"remarks\": \"Payable for March settlement\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2026-03-05T08:14:01Z",
"destination": {
"currency": "USDC",
"payment_rail": "SOLANA",
"account_id": "ewa_abc123",
"address": "8B57MCi1FX7ydB5SJUbWT5FWUwoHT88JsEfSFwNx32CV",
"external_account_id": "eba_abc123"
},
"id": "pi_tfr_9w7d3m2a",
"mode": "destination_address",
"object": "payment_intent",
"provider": "infinite",
"source": {
"currency": "USDC",
"payment_rail": "SOLANA",
"account_id": "ewa_abc123",
"address": "8B57MCi1FX7ydB5SJUbWT5FWUwoHT88JsEfSFwNx32CV",
"external_account_id": "eba_abc123"
},
"source_amount": {
"currency": "USDC",
"display_value": "1.000000",
"exponent": 6,
"value": "1000000"
},
"status": "pending",
"updated_at": "2026-03-05T08:14:01Z",
"deposit": {
"amount": {
"currency": "USDC",
"display_value": "1.000000",
"exponent": 6,
"value": "1000000"
},
"deposit_type": "fiat",
"payment_rail": "SWIFT",
"account_id": "eba_abc123",
"account_number": "1234567890",
"bank_address_line": "270 PARK AVENUE, NEW YORK, NY",
"bank_name": "JPMORGAN CHASE BANK",
"beneficiary_name": "Acme Corp",
"clabe": "002010077777777771",
"iban": "GB33BUKB20201555555555",
"memo": "Payment reference",
"reference": "Invoice #2026-001",
"routing_number": "021000021",
"swift_bic": "CHASUS33",
"to_address": "8B57MCi1FX7ydB5SJUbWT5FWUwoHT88JsEfSFwNx32CV"
},
"destination_amount": {
"currency": "USDC",
"display_value": "1.000000",
"exponent": 6,
"value": "1000000"
},
"next_action": {
"action_type": "await_funding"
},
"provider_fields": {},
"sign_prebuilt_tx": {
"encoding": "base64",
"transaction": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAED..."
}
}Create a payment intent (v2)
Create a provider-agnostic payment intent using a flat action shape.
Supported matrix:
- source: Grid account funding leg
- destination: synced external account for the internally selected provider
- rails:
SWIFTdestination rail
Action fields are top-level and stable across modes:
deposit: funding instructions (address or bank fields)sign_prebuilt_tx: transaction to sign and broadcastnext_action: optional follow-up hint for multi-step flows
curl --request POST \
--url https://grid.squads.xyz/api/grid/v1/accounts/{address}/payment-intents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-grid-environment: <x-grid-environment>' \
--data '
{
"amount": "100000000",
"destination": {
"currency": "USD",
"external_account_id": "6f4f23d5-5ca8-4c62-92f8-9d730f89adf4",
"payment_rail": "SWIFT",
"reference": "Invoice #2026-001"
},
"source": {
"currency": "USDC",
"payment_rail": "SOLANA",
"account_id": "ewa_abc123"
},
"client_reference_id": "invoice-2026-001",
"document_ids": [
"doc_abc123"
],
"fees": {
"developer_fee_fixed": 10000,
"developer_fee_percent": 0.015
},
"memo": "Invoice #2026-001",
"mode": "destination_address",
"payment_reason": "PAYMENT_FOR_GOODS_AND_SERVICES",
"remarks": "Payable for March settlement"
}
'import requests
url = "https://grid.squads.xyz/api/grid/v1/accounts/{address}/payment-intents"
payload = {
"amount": "100000000",
"destination": {
"currency": "USD",
"external_account_id": "6f4f23d5-5ca8-4c62-92f8-9d730f89adf4",
"payment_rail": "SWIFT",
"reference": "Invoice #2026-001"
},
"source": {
"currency": "USDC",
"payment_rail": "SOLANA",
"account_id": "ewa_abc123"
},
"client_reference_id": "invoice-2026-001",
"document_ids": ["doc_abc123"],
"fees": {
"developer_fee_fixed": 10000,
"developer_fee_percent": 0.015
},
"memo": "Invoice #2026-001",
"mode": "destination_address",
"payment_reason": "PAYMENT_FOR_GOODS_AND_SERVICES",
"remarks": "Payable for March settlement"
}
headers = {
"x-grid-environment": "<x-grid-environment>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-grid-environment': '<x-grid-environment>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: '100000000',
destination: {
currency: 'USD',
external_account_id: '6f4f23d5-5ca8-4c62-92f8-9d730f89adf4',
payment_rail: 'SWIFT',
reference: 'Invoice #2026-001'
},
source: {currency: 'USDC', payment_rail: 'SOLANA', account_id: 'ewa_abc123'},
client_reference_id: 'invoice-2026-001',
document_ids: ['doc_abc123'],
fees: {developer_fee_fixed: 10000, developer_fee_percent: 0.015},
memo: 'Invoice #2026-001',
mode: 'destination_address',
payment_reason: 'PAYMENT_FOR_GOODS_AND_SERVICES',
remarks: 'Payable for March settlement'
})
};
fetch('https://grid.squads.xyz/api/grid/v1/accounts/{address}/payment-intents', 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://grid.squads.xyz/api/grid/v1/accounts/{address}/payment-intents",
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([
'amount' => '100000000',
'destination' => [
'currency' => 'USD',
'external_account_id' => '6f4f23d5-5ca8-4c62-92f8-9d730f89adf4',
'payment_rail' => 'SWIFT',
'reference' => 'Invoice #2026-001'
],
'source' => [
'currency' => 'USDC',
'payment_rail' => 'SOLANA',
'account_id' => 'ewa_abc123'
],
'client_reference_id' => 'invoice-2026-001',
'document_ids' => [
'doc_abc123'
],
'fees' => [
'developer_fee_fixed' => 10000,
'developer_fee_percent' => 0.015
],
'memo' => 'Invoice #2026-001',
'mode' => 'destination_address',
'payment_reason' => 'PAYMENT_FOR_GOODS_AND_SERVICES',
'remarks' => 'Payable for March settlement'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-grid-environment: <x-grid-environment>"
],
]);
$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://grid.squads.xyz/api/grid/v1/accounts/{address}/payment-intents"
payload := strings.NewReader("{\n \"amount\": \"100000000\",\n \"destination\": {\n \"currency\": \"USD\",\n \"external_account_id\": \"6f4f23d5-5ca8-4c62-92f8-9d730f89adf4\",\n \"payment_rail\": \"SWIFT\",\n \"reference\": \"Invoice #2026-001\"\n },\n \"source\": {\n \"currency\": \"USDC\",\n \"payment_rail\": \"SOLANA\",\n \"account_id\": \"ewa_abc123\"\n },\n \"client_reference_id\": \"invoice-2026-001\",\n \"document_ids\": [\n \"doc_abc123\"\n ],\n \"fees\": {\n \"developer_fee_fixed\": 10000,\n \"developer_fee_percent\": 0.015\n },\n \"memo\": \"Invoice #2026-001\",\n \"mode\": \"destination_address\",\n \"payment_reason\": \"PAYMENT_FOR_GOODS_AND_SERVICES\",\n \"remarks\": \"Payable for March settlement\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-grid-environment", "<x-grid-environment>")
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://grid.squads.xyz/api/grid/v1/accounts/{address}/payment-intents")
.header("x-grid-environment", "<x-grid-environment>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"100000000\",\n \"destination\": {\n \"currency\": \"USD\",\n \"external_account_id\": \"6f4f23d5-5ca8-4c62-92f8-9d730f89adf4\",\n \"payment_rail\": \"SWIFT\",\n \"reference\": \"Invoice #2026-001\"\n },\n \"source\": {\n \"currency\": \"USDC\",\n \"payment_rail\": \"SOLANA\",\n \"account_id\": \"ewa_abc123\"\n },\n \"client_reference_id\": \"invoice-2026-001\",\n \"document_ids\": [\n \"doc_abc123\"\n ],\n \"fees\": {\n \"developer_fee_fixed\": 10000,\n \"developer_fee_percent\": 0.015\n },\n \"memo\": \"Invoice #2026-001\",\n \"mode\": \"destination_address\",\n \"payment_reason\": \"PAYMENT_FOR_GOODS_AND_SERVICES\",\n \"remarks\": \"Payable for March settlement\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://grid.squads.xyz/api/grid/v1/accounts/{address}/payment-intents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-grid-environment"] = '<x-grid-environment>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"100000000\",\n \"destination\": {\n \"currency\": \"USD\",\n \"external_account_id\": \"6f4f23d5-5ca8-4c62-92f8-9d730f89adf4\",\n \"payment_rail\": \"SWIFT\",\n \"reference\": \"Invoice #2026-001\"\n },\n \"source\": {\n \"currency\": \"USDC\",\n \"payment_rail\": \"SOLANA\",\n \"account_id\": \"ewa_abc123\"\n },\n \"client_reference_id\": \"invoice-2026-001\",\n \"document_ids\": [\n \"doc_abc123\"\n ],\n \"fees\": {\n \"developer_fee_fixed\": 10000,\n \"developer_fee_percent\": 0.015\n },\n \"memo\": \"Invoice #2026-001\",\n \"mode\": \"destination_address\",\n \"payment_reason\": \"PAYMENT_FOR_GOODS_AND_SERVICES\",\n \"remarks\": \"Payable for March settlement\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2026-03-05T08:14:01Z",
"destination": {
"currency": "USDC",
"payment_rail": "SOLANA",
"account_id": "ewa_abc123",
"address": "8B57MCi1FX7ydB5SJUbWT5FWUwoHT88JsEfSFwNx32CV",
"external_account_id": "eba_abc123"
},
"id": "pi_tfr_9w7d3m2a",
"mode": "destination_address",
"object": "payment_intent",
"provider": "infinite",
"source": {
"currency": "USDC",
"payment_rail": "SOLANA",
"account_id": "ewa_abc123",
"address": "8B57MCi1FX7ydB5SJUbWT5FWUwoHT88JsEfSFwNx32CV",
"external_account_id": "eba_abc123"
},
"source_amount": {
"currency": "USDC",
"display_value": "1.000000",
"exponent": 6,
"value": "1000000"
},
"status": "pending",
"updated_at": "2026-03-05T08:14:01Z",
"deposit": {
"amount": {
"currency": "USDC",
"display_value": "1.000000",
"exponent": 6,
"value": "1000000"
},
"deposit_type": "fiat",
"payment_rail": "SWIFT",
"account_id": "eba_abc123",
"account_number": "1234567890",
"bank_address_line": "270 PARK AVENUE, NEW YORK, NY",
"bank_name": "JPMORGAN CHASE BANK",
"beneficiary_name": "Acme Corp",
"clabe": "002010077777777771",
"iban": "GB33BUKB20201555555555",
"memo": "Payment reference",
"reference": "Invoice #2026-001",
"routing_number": "021000021",
"swift_bic": "CHASUS33",
"to_address": "8B57MCi1FX7ydB5SJUbWT5FWUwoHT88JsEfSFwNx32CV"
},
"destination_amount": {
"currency": "USDC",
"display_value": "1.000000",
"exponent": 6,
"value": "1000000"
},
"next_action": {
"action_type": "await_funding"
},
"provider_fields": {},
"sign_prebuilt_tx": {
"encoding": "base64",
"transaction": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAED..."
}
}Authorizations
Your Grid API key from the Grid Dashboard
Headers
Environment (sandbox, production)
Idempotency key forwarded to the provider (auto-generated when omitted)
Path Parameters
Smart account address
Body
Integer amount in source currency smallest units (for example, 1 USDC = 1000000 when exponent is 6).
"100000000"
Destination leg details.
Show child attributes
Show child attributes
Source leg details.
Show child attributes
Show child attributes
Optional caller-defined reference for reconciliation.
"invoice-2026-001"
Optional provider document identifiers (for example, for third-party payouts requiring supporting docs).
["doc_abc123"]
Optional fee controls; forwarded to providers that support fee fields.
Show child attributes
Show child attributes
Free-form memo/reference.
"Invoice #2026-001"
Intent mode. Defaults to destination_address.
destination_address Provider payment reason enum string. Forwarded when supported.
"PAYMENT_FOR_GOODS_AND_SERVICES"
Provider remarks forwarded to providers that support a dedicated remarks field.
"Payable for March settlement"
Response
Payment intent created
RFC3339 creation timestamp.
"2026-03-05T08:14:01Z"
Normalized destination party details.
Show child attributes
Show child attributes
Payment intent identifier.
"pi_tfr_9w7d3m2a"
Requested intent mode.
destination_address Resource type.
"payment_intent"
Provider that executed the request.
"infinite"
Normalized source party details.
Show child attributes
Show child attributes
Source amount breakdown.
Show child attributes
Show child attributes
Provider-backed payment intent status.
"pending"
RFC3339 update timestamp.
"2026-03-05T08:14:01Z"
Flat deposit action. Present when caller needs to transfer funds using returned instructions.
Show child attributes
Show child attributes
Destination amount breakdown when returned by provider.
Show child attributes
Show child attributes
Optional hint for additional follow-up action in future multi-step flows.
Show child attributes
Show child attributes
Provider-specific raw attributes for advanced integrations.
Flat signing action. Present when caller must sign and broadcast a prepared transaction.
Show child attributes
Show child attributes
Was this page helpful?