curl --request POST \
--url https://prod-api.stableyard.fi/v2/client/me/payments/{paymentId}/options/{optionId}/authorize \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'X-Stableyard-Payment-Secret: <api-key>' \
--data '
{
"actionId": "fund_auth_123",
"proof": {
"type": "managed_authorization",
"authorization": "approved"
}
}
'import requests
url = "https://prod-api.stableyard.fi/v2/client/me/payments/{paymentId}/options/{optionId}/authorize"
payload = {
"actionId": "fund_auth_123",
"proof": {
"type": "managed_authorization",
"authorization": "approved"
}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"X-Stableyard-Payment-Secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'X-Stableyard-Payment-Secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
actionId: 'fund_auth_123',
proof: {type: 'managed_authorization', authorization: 'approved'}
})
};
fetch('https://prod-api.stableyard.fi/v2/client/me/payments/{paymentId}/options/{optionId}/authorize', 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://prod-api.stableyard.fi/v2/client/me/payments/{paymentId}/options/{optionId}/authorize",
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([
'actionId' => 'fund_auth_123',
'proof' => [
'type' => 'managed_authorization',
'authorization' => 'approved'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>",
"X-Stableyard-Payment-Secret: <api-key>"
],
]);
$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://prod-api.stableyard.fi/v2/client/me/payments/{paymentId}/options/{optionId}/authorize"
payload := strings.NewReader("{\n \"actionId\": \"fund_auth_123\",\n \"proof\": {\n \"type\": \"managed_authorization\",\n \"authorization\": \"approved\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("X-Stableyard-Payment-Secret", "<api-key>")
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://prod-api.stableyard.fi/v2/client/me/payments/{paymentId}/options/{optionId}/authorize")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("X-Stableyard-Payment-Secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"actionId\": \"fund_auth_123\",\n \"proof\": {\n \"type\": \"managed_authorization\",\n \"authorization\": \"approved\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod-api.stableyard.fi/v2/client/me/payments/{paymentId}/options/{optionId}/authorize")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["X-Stableyard-Payment-Secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"actionId\": \"fund_auth_123\",\n \"proof\": {\n \"type\": \"managed_authorization\",\n \"authorization\": \"approved\"\n }\n}"
response = http.request(request)
puts response.read_body{
"paymentId": "payment_123",
"option": {
"id": "pay_option_vault_123",
"providerCode": "vault",
"paymentMethodType": "account_balance",
"paymentMethodId": "vault.stableyard",
"type": "account_balance",
"displayName": "Pay with Stableyard Vault",
"status": "pending",
"selectionStatus": "selected",
"requiredAmountAtomic": "10000000",
"paidAmountAtomic": "0",
"remainingAmountAtomic": "10000000",
"isTerminal": false,
"confirmationMode": "provider_webhook",
"transactionSubmissions": [],
"sourceAmount": {
"amountAtomic": "10000000",
"assetSymbol": "USDC",
"decimals": 6,
"chainId": 42161
},
"destinationAmount": {
"amountAtomic": "10000000",
"assetSymbol": "USDC",
"decimals": 6,
"chainId": 42161
},
"payerAmount": {
"amountAtomic": "10000000",
"amountDecimal": "10",
"assetSymbol": "USDC",
"decimals": 6,
"chainId": 42161,
"tokenAddress": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831"
},
"recipientAmount": {
"amountAtomic": "10000000",
"amountDecimal": "10",
"assetSymbol": "USDC",
"decimals": 6,
"chainId": 42161,
"tokenAddress": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831"
},
"providerFee": {
"amountAtomic": "0",
"amountDecimal": "0",
"assetSymbol": "USDC",
"decimals": 6,
"chainId": 42161,
"tokenAddress": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831"
},
"execution": null,
"expiresAt": null,
"refreshable": false,
"feeAmountAtomic": "0",
"actionExpiresAt": null,
"quoteExpiresAt": null,
"orderExpiresAt": null,
"receipts": []
},
"fundingOperation": {
"id": "pay_funding_123",
"status": "authorized",
"statusVersion": 2,
"commercialFeeMode": "parent_payment",
"transactionHash": null,
"authorizedAt": "2026-09-01T12:01:00.000Z",
"broadcastAt": null,
"confirmedAt": null,
"expiresAt": "2026-09-01T12:10:00.000Z"
}
}{
"error": {
"code": "bad_request",
"message": "The request is invalid"
}
}{
"error": {
"code": "unauthorized",
"message": "Authentication is required"
}
}{
"error": {
"code": "forbidden",
"message": "The credential does not allow this operation"
}
}{
"error": {
"code": "not_found",
"message": "The resource was not found"
}
}{
"error": {
"code": "idempotency_conflict",
"message": "The Idempotency-Key was already used with a different request"
}
}{
"error": {
"code": "payment_method_not_supported",
"message": "The requested payment method is not supported"
}
}{
"error": {
"code": "chain_config_missing",
"message": "The requested network is not configured for this environment"
}
}{
"error": {
"code": "rate_limited",
"message": "Too many requests"
}
}Authorize a Vault funding operation
Authorize the exact Vault-to-escrow transfer for a receive Payment.
curl --request POST \
--url https://prod-api.stableyard.fi/v2/client/me/payments/{paymentId}/options/{optionId}/authorize \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'X-Stableyard-Payment-Secret: <api-key>' \
--data '
{
"actionId": "fund_auth_123",
"proof": {
"type": "managed_authorization",
"authorization": "approved"
}
}
'import requests
url = "https://prod-api.stableyard.fi/v2/client/me/payments/{paymentId}/options/{optionId}/authorize"
payload = {
"actionId": "fund_auth_123",
"proof": {
"type": "managed_authorization",
"authorization": "approved"
}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"X-Stableyard-Payment-Secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'X-Stableyard-Payment-Secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
actionId: 'fund_auth_123',
proof: {type: 'managed_authorization', authorization: 'approved'}
})
};
fetch('https://prod-api.stableyard.fi/v2/client/me/payments/{paymentId}/options/{optionId}/authorize', 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://prod-api.stableyard.fi/v2/client/me/payments/{paymentId}/options/{optionId}/authorize",
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([
'actionId' => 'fund_auth_123',
'proof' => [
'type' => 'managed_authorization',
'authorization' => 'approved'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>",
"X-Stableyard-Payment-Secret: <api-key>"
],
]);
$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://prod-api.stableyard.fi/v2/client/me/payments/{paymentId}/options/{optionId}/authorize"
payload := strings.NewReader("{\n \"actionId\": \"fund_auth_123\",\n \"proof\": {\n \"type\": \"managed_authorization\",\n \"authorization\": \"approved\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("X-Stableyard-Payment-Secret", "<api-key>")
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://prod-api.stableyard.fi/v2/client/me/payments/{paymentId}/options/{optionId}/authorize")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("X-Stableyard-Payment-Secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"actionId\": \"fund_auth_123\",\n \"proof\": {\n \"type\": \"managed_authorization\",\n \"authorization\": \"approved\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod-api.stableyard.fi/v2/client/me/payments/{paymentId}/options/{optionId}/authorize")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["X-Stableyard-Payment-Secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"actionId\": \"fund_auth_123\",\n \"proof\": {\n \"type\": \"managed_authorization\",\n \"authorization\": \"approved\"\n }\n}"
response = http.request(request)
puts response.read_body{
"paymentId": "payment_123",
"option": {
"id": "pay_option_vault_123",
"providerCode": "vault",
"paymentMethodType": "account_balance",
"paymentMethodId": "vault.stableyard",
"type": "account_balance",
"displayName": "Pay with Stableyard Vault",
"status": "pending",
"selectionStatus": "selected",
"requiredAmountAtomic": "10000000",
"paidAmountAtomic": "0",
"remainingAmountAtomic": "10000000",
"isTerminal": false,
"confirmationMode": "provider_webhook",
"transactionSubmissions": [],
"sourceAmount": {
"amountAtomic": "10000000",
"assetSymbol": "USDC",
"decimals": 6,
"chainId": 42161
},
"destinationAmount": {
"amountAtomic": "10000000",
"assetSymbol": "USDC",
"decimals": 6,
"chainId": 42161
},
"payerAmount": {
"amountAtomic": "10000000",
"amountDecimal": "10",
"assetSymbol": "USDC",
"decimals": 6,
"chainId": 42161,
"tokenAddress": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831"
},
"recipientAmount": {
"amountAtomic": "10000000",
"amountDecimal": "10",
"assetSymbol": "USDC",
"decimals": 6,
"chainId": 42161,
"tokenAddress": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831"
},
"providerFee": {
"amountAtomic": "0",
"amountDecimal": "0",
"assetSymbol": "USDC",
"decimals": 6,
"chainId": 42161,
"tokenAddress": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831"
},
"execution": null,
"expiresAt": null,
"refreshable": false,
"feeAmountAtomic": "0",
"actionExpiresAt": null,
"quoteExpiresAt": null,
"orderExpiresAt": null,
"receipts": []
},
"fundingOperation": {
"id": "pay_funding_123",
"status": "authorized",
"statusVersion": 2,
"commercialFeeMode": "parent_payment",
"transactionHash": null,
"authorizedAt": "2026-09-01T12:01:00.000Z",
"broadcastAt": null,
"confirmedAt": null,
"expiresAt": "2026-09-01T12:10:00.000Z"
}
}{
"error": {
"code": "bad_request",
"message": "The request is invalid"
}
}{
"error": {
"code": "unauthorized",
"message": "Authentication is required"
}
}{
"error": {
"code": "forbidden",
"message": "The credential does not allow this operation"
}
}{
"error": {
"code": "not_found",
"message": "The resource was not found"
}
}{
"error": {
"code": "idempotency_conflict",
"message": "The Idempotency-Key was already used with a different request"
}
}{
"error": {
"code": "payment_method_not_supported",
"message": "The requested payment method is not supported"
}
}{
"error": {
"code": "chain_config_missing",
"message": "The requested network is not configured for this environment"
}
}{
"error": {
"code": "rate_limited",
"message": "Too many requests"
}
}actionId from the selected option’s execution object and authorizes Stableyard to execute the exact Vault-to-escrow transfer under the active policy. The client bearer token identifies the payer UPA; X-Stableyard-Payment-Secret binds the command to one Payment.
A successful response means authorization was recorded, not that funds arrived or the Payment completed. The Payment advances only after Stableyard verifies the transfer on-chain. Underpayments, duplicate receipts, late payments and execution failures follow the Payment’s normal reconciliation and recovery states.
Idempotency-Key is required; reusing it with different input returns 409 idempotency_conflict.Authorizations
Short-lived account-bound token returned by POST /v2/client/auth/exchange.
Payment-specific secret used together with an account-bound Client bearer token. It proves access to exactly one Payment and must never be placed in a URL, analytics event, or log.
Headers
Required retry key for this account-bound Payment mutation. Reuse the same key only with the identical Payment, option, and body; different input returns 409 idempotency_conflict.
1 - 256^[ -~]+$"vault-payment-option-01"
Path Parameters
Canonical receive Payment whose escrow will be funded.
^payment_[A-Za-z0-9_-]+$"payment_123"
Vault option returned by the account-bound option endpoint.
^pay_option_[A-Za-z0-9_-]+$"pay_option_vault_123"
Body
Single-use action identifier returned in option.execution.actionId.
1 - 128"fund_auth_123"
Show child attributes
Show child attributes
Optional partner metadata. Must be JSON-safe, at most 4096 bytes, depth 3, 25 keys per object, 512 characters per string, and 50 items per array.