Retrieve Fees
The Platform will make this request to the anchor every time a transaction is initiated by a client application
without a quote_id
.
The Anchor must ensure that the sending and receiving customers specified in the request meet the KYC requirements necessary to partake in the transaction described in the request.
The anchor must return the fee it will charge for the transaction.
In the future, this endpoint may be used to provide estimated fees to client applications prior to initiating transactions. When this change is made, the request schema will be adapted to support the use case.
Query Parameters
- send_asset string required
The asset the client application will send to the anchor in exchange for
receive_asset
in Asset Identification Format. - receive_asset string required
The asset the that the anchor will send in exchange for
send_asset
in Asset Identification Format. - send_amount string
The amount of
send_asset
the client application will send in exchange forreceive_asset
. One ofsend_amount
orreceive_amount
will always be included in the request. If the client application specified aquote_id
in its transaction creation request, both amounts specified in the referenced quote will be passed. - receive_amount string
The amount of
receive_asset
the anchor will send in exchange forsend_asset
. One ofsend_amount
orreceive_amount
will always be included in the request. If the client application specified aquote_id
in its transaction creation request, both amounts specified in the referenced quote will be passed. - client_id string required
An identifier for the client application making the request. This ID can be used to offer different fees to different clients. A client ID it the Stellar account of a sending anchor: In SEP-31, the
client_id
should match the account of a known SEP-31 sending anchor match the one used to authenticate via SEP-10. - sender_id string required
The SEP-12 customer ID of the sending user.
- receiver_id string required
The SEP-12 customer ID of the receiving user.
- 200
- 422
- 500
Success.
- application/json
- Schema
- Example (from schema)
Schema
fee object
amount string requiredasset string required
{
"fee": {
"amount": "string",
"asset": "string"
}
}
Unprocessable Entity. This status should be returned when the anchor understood the request but cannot
return a success response. An example for when this response code would be appropriate is if the sender
and/or receiver is not permitted to initiate a transaction with the specified amounts. In these cases,
the Platform will respond to the client application's request with a 400 Bad Request
and include the
error message provided by the anchor in the response body.
- application/json
- Schema
- Example (from schema)
Schema
- error string required
- id string
{
"error": "string",
"id": "string"
}
Error. The Platform will respond to the client application with the same response code and body.
- application/json
- Schema
- Example (from schema)
Schema
- error string required
- id string
{
"error": "string",
"id": "string"
}