Skip to content

What sending a payment now would come to, with nothing sent

POST
/v1/payments/quote
curl --request POST \
--url https://api.sotirea.com/v1/payments/quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "amount": "example", "asset": "example", "chain_id": "example", "reference": "example", "to": "example", "vault_id": 1 }'

Runs the checks sending runs, without recording, signing or announcing anything and without an Idempotency-Key: what your payment rules say, whether the vault has the amount free, and the most the network fee can cost at the network’s price now, in the network’s coin. A quote is not a reservation: the payment is checked and priced again when it is sent, and the fee may differ.

Media typeapplication/json
object
amount
required

How much, in the asset’s smallest unit: 1.5 of an asset with 18 decimals is 1500000000000000000.

string
asset

Native for the network’s own coin, the default, or a token’s contract address.

string
chain_id

The network, needed only when the vault is open on more than one.

string
reference

Your own id for the payment, such as an order or payout id: 1 to 128 characters with no spaces. It comes back on every answer and webhook about the payment, and GET /v1/payments?reference= finds it. Unlike the Idempotency-Key it need not be unique.

string
to
required

The address to pay.

string
vault_id
required

The vault to pay out of.

integer

Example generated

{
"amount": "example",
"asset": "example",
"chain_id": "example",
"reference": "example",
"to": "example",
"vault_id": 1
}

Done.

Media typeapplication/json
object
data
required
object
approvals_required

How many people in your organisation would have to approve it.

integer
chain_id
string
fee_ceiling
required
Any of:
string
fee_decimals
integer
fee_symbol
string
gas_pool_covers
required

Whether your gas pool on that network holds the fee ceiling now.

boolean
includes_vault_creation
required

The vault’s first payment also creates it on the network: its fee is included, with an allowance for the payment itself.

boolean
outcome
required

Allowed, needs_approval, refused (by your rules or the vault’s balance) or unavailable (the network would not price it now).

string
quoted_at
required

When the network’s price was read.

string format: date-time
reason

Why, in words you may show a person.

string
rule

The rule that would refuse or hold it, by its stable name; estimate when the network would not price it.

string
meta
object
request_id

Quote it when asking about a request; it is in the X-Request-Id header too.

string
success
required

Example

{
"success": true
}

Refused or failed, in words a person can act on.

Media typeapplication/json
object
error
required
object
code
required
string
fields
object
key
additional properties
string
message
required
string
meta
object
request_id

Quote it when asking about a request.

string
success
required

Example

{
"success": false
}