curl --request POST \
--url https://platform.spritz.finance/v1/deposits/direct/prepare \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sourceId": "fs_01JV7Q8M4Y8K6N2Z5P3R1T9W0X",
"address": "9n4nbM75f5Ui33ZbPYXn59EwSb9Y1zdyu3x2b1f8jQRY",
"asset": "USDC",
"amountUsd": "100.00",
"customerContext": {}
}
'import requests
url = "https://platform.spritz.finance/v1/deposits/direct/prepare"
payload = {
"sourceId": "fs_01JV7Q8M4Y8K6N2Z5P3R1T9W0X",
"address": "9n4nbM75f5Ui33ZbPYXn59EwSb9Y1zdyu3x2b1f8jQRY",
"asset": "USDC",
"amountUsd": "100.00",
"customerContext": {}
}
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({
sourceId: 'fs_01JV7Q8M4Y8K6N2Z5P3R1T9W0X',
address: '9n4nbM75f5Ui33ZbPYXn59EwSb9Y1zdyu3x2b1f8jQRY',
asset: 'USDC',
amountUsd: '100.00',
customerContext: {}
})
};
fetch('https://platform.spritz.finance/v1/deposits/direct/prepare', 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://platform.spritz.finance/v1/deposits/direct/prepare",
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([
'sourceId' => 'fs_01JV7Q8M4Y8K6N2Z5P3R1T9W0X',
'address' => '9n4nbM75f5Ui33ZbPYXn59EwSb9Y1zdyu3x2b1f8jQRY',
'asset' => 'USDC',
'amountUsd' => '100.00',
'customerContext' => [
]
]),
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://platform.spritz.finance/v1/deposits/direct/prepare"
payload := strings.NewReader("{\n \"sourceId\": \"fs_01JV7Q8M4Y8K6N2Z5P3R1T9W0X\",\n \"address\": \"9n4nbM75f5Ui33ZbPYXn59EwSb9Y1zdyu3x2b1f8jQRY\",\n \"asset\": \"USDC\",\n \"amountUsd\": \"100.00\",\n \"customerContext\": {}\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://platform.spritz.finance/v1/deposits/direct/prepare")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sourceId\": \"fs_01JV7Q8M4Y8K6N2Z5P3R1T9W0X\",\n \"address\": \"9n4nbM75f5Ui33ZbPYXn59EwSb9Y1zdyu3x2b1f8jQRY\",\n \"asset\": \"USDC\",\n \"amountUsd\": \"100.00\",\n \"customerContext\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.spritz.finance/v1/deposits/direct/prepare")
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 \"sourceId\": \"fs_01JV7Q8M4Y8K6N2Z5P3R1T9W0X\",\n \"address\": \"9n4nbM75f5Ui33ZbPYXn59EwSb9Y1zdyu3x2b1f8jQRY\",\n \"asset\": \"USDC\",\n \"amountUsd\": \"100.00\",\n \"customerContext\": {}\n}"
response = http.request(request)
puts response.read_body{
"preparationId": "prep_01JV7Q8M4Y8K6N2Z5P3R1T9W0X",
"kind": "deposit_authorization",
"expiresAt": "2023-11-07T05:31:56Z",
"messageVersion": "v1",
"message": "<string>",
"summary": {
"quoteType": "exact_input",
"requestedAmountUsd": "<string>",
"requestedPriority": "normal",
"priority": "normal",
"releaseDecisionMode": "after_settlement",
"feeRateBps": 123,
"principalAmountUsd": "<string>",
"instantPortionUsd": "<string>",
"settlementPortionUsd": "<string>",
"expectedAssetAmount": "<string>",
"grossFeeUsd": "<string>",
"publishedFeeUsd": "<string>",
"regularPublishedFeeUsd": "<string>",
"instantPublishedFeeUsd": "<string>",
"feeSubsidyUsd": "<string>",
"userFeeUsd": "<string>",
"totalDebitAmountUsd": "<string>",
"feeSubsidy": {
"percentage": 123,
"percentageBps": 123,
"maxAmountUsd": "<string>",
"appliedAmountUsd": "<string>"
},
"network": "solana",
"asset": "USDC",
"assetAddress": "<string>",
"destinationAddress": "<string>"
},
"submissionToken": "ach_submit_eyJhbGciOiJIUzI1NiJ9..."
}{
"title": "Unauthorized",
"status": 400,
"type": "urn:problem-type:auth:unauthorized",
"detail": "<string>",
"instance": "/errors/1234567890",
"code": "transaction_limit",
"field": "amountUsd",
"retryable": true,
"retryAfter": 5,
"suggestedAction": "auto_ramp",
"clearsAt": "2023-11-07T05:31:56Z",
"availableAt": "2023-11-07T05:31:56Z",
"permanent": true,
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{
"title": "Unauthorized",
"status": 401,
"type": "urn:problem-type:auth:unauthorized",
"detail": "Bearer token required",
"instance": "<string>",
"realm": "API",
"scope": "read:users"
}{
"title": "Unauthorized",
"status": 400,
"type": "urn:problem-type:auth:unauthorized",
"detail": "<string>",
"instance": "/errors/1234567890",
"code": "transaction_limit",
"field": "amountUsd",
"retryable": true,
"retryAfter": 5,
"suggestedAction": "auto_ramp",
"clearsAt": "2023-11-07T05:31:56Z",
"availableAt": "2023-11-07T05:31:56Z",
"permanent": true
}{
"title": "<string>",
"status": 404,
"resourceType": "user",
"resourceId": "<string>",
"type": "about:blank",
"detail": "<string>",
"instance": "<string>"
}{
"title": "Unauthorized",
"status": 400,
"type": "urn:problem-type:auth:unauthorized",
"detail": "<string>",
"instance": "/errors/1234567890",
"code": "transaction_limit",
"field": "amountUsd",
"retryable": true,
"retryAfter": 5,
"suggestedAction": "auto_ramp",
"clearsAt": "2023-11-07T05:31:56Z",
"availableAt": "2023-11-07T05:31:56Z",
"permanent": true
}{
"title": "Unauthorized",
"status": 400,
"type": "urn:problem-type:auth:unauthorized",
"detail": "<string>",
"instance": "/errors/1234567890",
"code": "transaction_limit",
"field": "amountUsd",
"retryable": true,
"retryAfter": 5,
"suggestedAction": "auto_ramp",
"clearsAt": "2023-11-07T05:31:56Z",
"availableAt": "2023-11-07T05:31:56Z",
"permanent": true
}{
"title": "Unauthorized",
"status": 400,
"type": "urn:problem-type:auth:unauthorized",
"detail": "<string>",
"instance": "/errors/1234567890",
"code": "transaction_limit",
"field": "amountUsd",
"retryable": true,
"retryAfter": 5,
"suggestedAction": "auto_ramp",
"clearsAt": "2023-11-07T05:31:56Z",
"availableAt": "2023-11-07T05:31:56Z",
"permanent": true
}Prepare a direct deposit authorization
Creates the canonical ACH authorization message for a deposit targeting a raw wallet address. Integrators can include the public client IP their edge observed to receive a short-lived submissionToken for direct client submission. During migration, an integrator can omit clientNetwork and submit through its HMAC-authenticated backend by including clientIp on create. Authorization is derived from the verified ACH funding source; no wallet signature is required.
curl --request POST \
--url https://platform.spritz.finance/v1/deposits/direct/prepare \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sourceId": "fs_01JV7Q8M4Y8K6N2Z5P3R1T9W0X",
"address": "9n4nbM75f5Ui33ZbPYXn59EwSb9Y1zdyu3x2b1f8jQRY",
"asset": "USDC",
"amountUsd": "100.00",
"customerContext": {}
}
'import requests
url = "https://platform.spritz.finance/v1/deposits/direct/prepare"
payload = {
"sourceId": "fs_01JV7Q8M4Y8K6N2Z5P3R1T9W0X",
"address": "9n4nbM75f5Ui33ZbPYXn59EwSb9Y1zdyu3x2b1f8jQRY",
"asset": "USDC",
"amountUsd": "100.00",
"customerContext": {}
}
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({
sourceId: 'fs_01JV7Q8M4Y8K6N2Z5P3R1T9W0X',
address: '9n4nbM75f5Ui33ZbPYXn59EwSb9Y1zdyu3x2b1f8jQRY',
asset: 'USDC',
amountUsd: '100.00',
customerContext: {}
})
};
fetch('https://platform.spritz.finance/v1/deposits/direct/prepare', 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://platform.spritz.finance/v1/deposits/direct/prepare",
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([
'sourceId' => 'fs_01JV7Q8M4Y8K6N2Z5P3R1T9W0X',
'address' => '9n4nbM75f5Ui33ZbPYXn59EwSb9Y1zdyu3x2b1f8jQRY',
'asset' => 'USDC',
'amountUsd' => '100.00',
'customerContext' => [
]
]),
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://platform.spritz.finance/v1/deposits/direct/prepare"
payload := strings.NewReader("{\n \"sourceId\": \"fs_01JV7Q8M4Y8K6N2Z5P3R1T9W0X\",\n \"address\": \"9n4nbM75f5Ui33ZbPYXn59EwSb9Y1zdyu3x2b1f8jQRY\",\n \"asset\": \"USDC\",\n \"amountUsd\": \"100.00\",\n \"customerContext\": {}\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://platform.spritz.finance/v1/deposits/direct/prepare")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sourceId\": \"fs_01JV7Q8M4Y8K6N2Z5P3R1T9W0X\",\n \"address\": \"9n4nbM75f5Ui33ZbPYXn59EwSb9Y1zdyu3x2b1f8jQRY\",\n \"asset\": \"USDC\",\n \"amountUsd\": \"100.00\",\n \"customerContext\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.spritz.finance/v1/deposits/direct/prepare")
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 \"sourceId\": \"fs_01JV7Q8M4Y8K6N2Z5P3R1T9W0X\",\n \"address\": \"9n4nbM75f5Ui33ZbPYXn59EwSb9Y1zdyu3x2b1f8jQRY\",\n \"asset\": \"USDC\",\n \"amountUsd\": \"100.00\",\n \"customerContext\": {}\n}"
response = http.request(request)
puts response.read_body{
"preparationId": "prep_01JV7Q8M4Y8K6N2Z5P3R1T9W0X",
"kind": "deposit_authorization",
"expiresAt": "2023-11-07T05:31:56Z",
"messageVersion": "v1",
"message": "<string>",
"summary": {
"quoteType": "exact_input",
"requestedAmountUsd": "<string>",
"requestedPriority": "normal",
"priority": "normal",
"releaseDecisionMode": "after_settlement",
"feeRateBps": 123,
"principalAmountUsd": "<string>",
"instantPortionUsd": "<string>",
"settlementPortionUsd": "<string>",
"expectedAssetAmount": "<string>",
"grossFeeUsd": "<string>",
"publishedFeeUsd": "<string>",
"regularPublishedFeeUsd": "<string>",
"instantPublishedFeeUsd": "<string>",
"feeSubsidyUsd": "<string>",
"userFeeUsd": "<string>",
"totalDebitAmountUsd": "<string>",
"feeSubsidy": {
"percentage": 123,
"percentageBps": 123,
"maxAmountUsd": "<string>",
"appliedAmountUsd": "<string>"
},
"network": "solana",
"asset": "USDC",
"assetAddress": "<string>",
"destinationAddress": "<string>"
},
"submissionToken": "ach_submit_eyJhbGciOiJIUzI1NiJ9..."
}{
"title": "Unauthorized",
"status": 400,
"type": "urn:problem-type:auth:unauthorized",
"detail": "<string>",
"instance": "/errors/1234567890",
"code": "transaction_limit",
"field": "amountUsd",
"retryable": true,
"retryAfter": 5,
"suggestedAction": "auto_ramp",
"clearsAt": "2023-11-07T05:31:56Z",
"availableAt": "2023-11-07T05:31:56Z",
"permanent": true,
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{
"title": "Unauthorized",
"status": 401,
"type": "urn:problem-type:auth:unauthorized",
"detail": "Bearer token required",
"instance": "<string>",
"realm": "API",
"scope": "read:users"
}{
"title": "Unauthorized",
"status": 400,
"type": "urn:problem-type:auth:unauthorized",
"detail": "<string>",
"instance": "/errors/1234567890",
"code": "transaction_limit",
"field": "amountUsd",
"retryable": true,
"retryAfter": 5,
"suggestedAction": "auto_ramp",
"clearsAt": "2023-11-07T05:31:56Z",
"availableAt": "2023-11-07T05:31:56Z",
"permanent": true
}{
"title": "<string>",
"status": 404,
"resourceType": "user",
"resourceId": "<string>",
"type": "about:blank",
"detail": "<string>",
"instance": "<string>"
}{
"title": "Unauthorized",
"status": 400,
"type": "urn:problem-type:auth:unauthorized",
"detail": "<string>",
"instance": "/errors/1234567890",
"code": "transaction_limit",
"field": "amountUsd",
"retryable": true,
"retryAfter": 5,
"suggestedAction": "auto_ramp",
"clearsAt": "2023-11-07T05:31:56Z",
"availableAt": "2023-11-07T05:31:56Z",
"permanent": true
}{
"title": "Unauthorized",
"status": 400,
"type": "urn:problem-type:auth:unauthorized",
"detail": "<string>",
"instance": "/errors/1234567890",
"code": "transaction_limit",
"field": "amountUsd",
"retryable": true,
"retryAfter": 5,
"suggestedAction": "auto_ramp",
"clearsAt": "2023-11-07T05:31:56Z",
"availableAt": "2023-11-07T05:31:56Z",
"permanent": true
}{
"title": "Unauthorized",
"status": 400,
"type": "urn:problem-type:auth:unauthorized",
"detail": "<string>",
"instance": "/errors/1234567890",
"code": "transaction_limit",
"field": "amountUsd",
"retryable": true,
"retryAfter": 5,
"suggestedAction": "auto_ramp",
"clearsAt": "2023-11-07T05:31:56Z",
"availableAt": "2023-11-07T05:31:56Z",
"permanent": true
}Authorizations
User bearer credential: either a Cognito JWT or an ak_ user API key. Backend integrators using HMAC must include the user API key alongside the three HMAC headers on user-scoped endpoints.
Body
Opaque public funding source identifier
"fs_01JV7Q8M4Y8K6N2Z5P3R1T9W0X"
Destination wallet address to deposit into. Validated but not proven via wallet signature; authorization is derived from the verified ACH funding source.
"9n4nbM75f5Ui33ZbPYXn59EwSb9Y1zdyu3x2b1f8jQRY"
solana, ethereum, polygon, base, avalanche, arbitrum Asset sent to the deposit destination
USDC "USDC"
exact_input, exact_output Requested USD amount as a decimal string
"100.00"
normal, high Optional partner-provided customer context. Maximum 8192 encoded UTF-8 bytes. Missing, unrecognized or unsupported fields do not block preparation. Do not send credentials or bank data.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Response for status 200
Opaque public preparation identifier
"prep_01JV7Q8M4Y8K6N2Z5P3R1T9W0X"
deposit_authorization Identifies the authorization template that produced message. Spritz selects it server-side from the integrator; clients cannot request one. Display message verbatim and submit the preparation unchanged.
v1, fomo_v1 "v1"
Display-ready ACH authorization message
Show child attributes
Show child attributes
Short-lived, preparation-bound bearer capability returned for integrator preparations. Send it only to the authorizing client, which uses it to submit this preparation directly to Spritz.
"ach_submit_eyJhbGciOiJIUzI1NiJ9..."