What sending a payment now would come to, with nothing sent
const url = 'https://api.sotirea.com/v1/payments/quote';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"amount":"example","asset":"example","chain_id":"example","reference":"example","to":"example","vault_id":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
How much, in the asset’s smallest unit: 1.5 of an asset with 18 decimals is 1500000000000000000.
Native for the network’s own coin, the default, or a token’s contract address.
The network, needed only when the vault is open on more than one.
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.
The address to pay.
The vault to pay out of.
Example generated
{ "amount": "example", "asset": "example", "chain_id": "example", "reference": "example", "to": "example", "vault_id": 1}Responses
Section titled “Responses”Done.
object
object
How many people in your organisation would have to approve it.
Whether your gas pool on that network holds the fee ceiling now.
The vault’s first payment also creates it on the network: its fee is included, with an allowance for the payment itself.
Allowed, needs_approval, refused (by your rules or the vault’s balance) or unavailable (the network would not price it now).
When the network’s price was read.
Why, in words you may show a person.
The rule that would refuse or hold it, by its stable name; estimate when the network would not price it.
object
Quote it when asking about a request; it is in the X-Request-Id header too.
Example
{ "success": true}default
Section titled “default”Refused or failed, in words a person can act on.
object
object
object
object
Quote it when asking about a request.
Example
{ "success": false}