Method
POST /v1/payments/accounts/upsert
Body Parameters
Headers
string
Bearer token (requires
payments:write).string
application/jsonRequest Example
curl -X POST https://api.voyantcloud.com/v1/payments/accounts/upsert \
-H "Authorization: Bearer $VOYANT_API_KEY" \
-H "content-type: application/json" \
-d '{
"provider": "netopia",
"displayName": "Netopia LIVE",
"liveMode": true,
"config": {
"posSignature": "xxxx-xxxx-xxxx",
"apiKey": "secret-api-key"
}
}'
await fetch("https://api.voyantcloud.com/v1/payments/accounts/upsert", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.VOYANT_API_KEY}`,
"content-type": "application/json",
},
body: JSON.stringify({
provider: "netopia",
displayName: "Netopia Sandbox",
liveMode: false,
config: {
posSignature: process.env.NETOPIA_POS_SIGNATURE!,
apiKey: process.env.NETOPIA_API_KEY!,
},
}),
})
import os, requests
payload = {
"provider": "netopia",
"displayName": "Netopia Sandbox",
"liveMode": False,
"config": {
"posSignature": os.environ["NETOPIA_POS_SIGNATURE"],
"apiKey": os.environ["NETOPIA_API_KEY"],
},
}
resp = requests.post(
"https://api.voyantcloud.com/v1/payments/accounts/upsert",
headers={
"Authorization": f"Bearer {os.environ['VOYANT_API_KEY']}",
"content-type": "application/json",
},
json=payload,
)
account = resp.json()
Response
{ "id": "payacct_123" }
The endpoint encrypts credentials using Cloud KMS. Configure
GCP_SERVICE_ACCOUNT_KEY + GCP_KMS_INTEGRATIONS_KEY_NAME (or KMS_ENCRYPTION_KEY for development) before upserting accounts. Without encryption keys the API returns 501.