Skip to main content
POST
Settle Permission

Authorizations

Authorization
string
header
required

Your Nevermined API Key (starts with 'nvm:'). Get one at nevermined.app under Settings > API Keys.

Body

application/json

Settlement request

accessToken
string
required
agentId
string
required
creditsUsed
integer
required
requestMetadata
object

Response

Settlement complete

Settlement receipt. success alone tells you the settle worked; what to check in addition depends on billingModel. On credits plans the payment shows up as creditsRedeemed > 0. On pay-as-you-go plans there is no credit balance, so creditsRedeemed and remainingBalance are always the string "0" even on a charge that succeeded — the proof there is success: true plus a non-empty orderTx (fiat rails) or transaction (crypto rails). Do not gate on creditsRedeemed without reading billingModel first: on a card rail that reports a real charge as a decline and invites a retry of a payment that already went through. Note the credit fields are strings, so "0" is truthy while Number("0") > 0 is false.

success
boolean

Whether settlement was successful.

errorReason
string

Reason for settlement failure (only present if success is false).

payer
string

Address of the payer's wallet.

transaction
string

Blockchain transaction hash. On crypto pay-as-you-go plans this is also the reference for the per-request charge.

network
string

Network identifier. The discriminator is the rail, not the billing model: a CAIP-2 chain id (eip155:84532) for crypto rails under both billing models, or the settling payment provider (stripe, braintree, visa) for fiat card-delegation rails.

Example:

"eip155:84532"

billingModel
enum<string>

Which billing model this settle was priced under. Present regardless of success — check success before treating it as evidence of a charge. Read it before the two credit fields.

Available options:
credits,
pay-as-you-go
creditsRedeemed
string

Number of credits redeemed. Always "0" for pay-as-you-go plans, which hold no credit balance — including on a settle that charged the buyer successfully.

Example:

"2"

remainingBalance
string

Subscriber's remaining credit balance. Always "0" for pay-as-you-go plans — the per-request charge is referenced by orderTx (fiat) or transaction (crypto), not here.

Example:

"98"

orderTx
string

Reference for the order or per-request charge, if one occurred. On fiat pay-as-you-go this is the per-request charge (a Stripe PaymentIntent id, a Braintree transaction id); crypto pay-as-you-go reports its on-chain order in transaction instead. On credits plans it is set only when the settle had to order credits first (auto top-up).

Example:

"pi_3TUrvfBYvSRKcV420xCBjHb1"