Retrieve Fees
GET/fee
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.
Request
Query Parameters
The asset the client application will send to the anchor in exchange for receive_asset
in
Asset Identification Format.
The asset the that the anchor will send in exchange for send_asset
in
Asset Identification Format.
The amount of send_asset
the client application will send in exchange for receive_asset
. One of send_amount
or receive_amount
will always be included in the request. If the client application specified a quote_id
in
its transaction creation request, both amounts specified in the referenced quote will be passed.
The amount of receive_asset
the anchor will send in exchange for send_asset
. One of send_amount
or
receive_amount
will always be included in the request. If the client application specified a quote_id
in its
transaction creation request, both amounts specified in the referenced quote will be passed.
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.
The SEP-12 customer ID of the sending user.
The SEP-12 customer ID of the receiving user.
Responses
- 200
- 422
- 500
- application/json
- Schema
- Example (from schema)
Schema
fee
object
{
"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",
"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",
"id": "string"
}