API Reference

Create custodian account

Register settlement wallets and callback settings for an API key.

POSThttps://api.argonpay.app/graphqlcreateCustodianAccount

Registers custodian settlement settings for your API key (one custodian per key). Debits 1 query.

Use the CustodianCreateInput input type.

Endpoint

POST https://api.argonpay.app/graphql

Mutation

GraphQL
mutation CreateCustodianAccount($input: CustodianCreateInput!) {
createCustodianAccount(input: $input) {
code
message
custodian {
id
apiKey
wallets {
bep20
polygon
base
solana
}
callbackUrl
createdAt
}
apiKey {
key
queriesLeft
}
}
}

Input fields

NameTypeRequiredDescription
apiKeyString!YesYour API key
walletsCustodianWalletsInputNoPublic settlement addresses
wallets.bep20StringNoBEP20 settlement address
wallets.polygonStringNoPolygon settlement address
wallets.baseStringNoBase settlement address
wallets.solanaStringNoSolana settlement address
callbackUrlStringNoHTTPS webhook URL for payment notifications
adminKeysCustodianAdminKeysInputNoAdvanced settlement configuration (server-side only; do not expose in clients)
privateKeyStringNoAdvanced settlement configuration (server-side only; do not expose in clients)

Example variables (public fields)

JSON
{
"input": {
"apiKey": "YOUR_API_KEY",
"wallets": {
"bep20": "0xYourBep20Address",
"polygon": "0xYourPolygonAddress",
"base": "0xYourBaseAddress",
"solana": "YourSolanaAddress"
},
"callbackUrl": "https://merchant.example/webhooks/argonpay"
}
}

Errors

CodeMeaning
401 / 402Invalid key or query limit
409Custodian already exists for this API key