FAQ
How To Use JWTs?
As part of the flow, once a user makes a request, i.e. an interactive withdrawal/deposit request, it will be processed by the Anchor Platform and forwarded to your service. The Anchor Platform will make a GET
call to <configured url>?token=<jwt token>
.
This JWT token will contain:
exp
is the expiration time of the token. You should check that the provided token has not expired.sub
is the account associated with this transaction. It can be used to identify the user account. Note that this value may be different from the account that will be used to receive/send funds.jti
is the hash of the transaction.data
is the extra payload that has been set by the user. It will always contain the Stellarasset
wants to deposit or withdraw. If provided by the client, it will also contain theamount
the user wants to transact, theclient_domain
of the wallet verified during SEP-10 authentication, andclient_name
(defined as 'name' in clients configuration if provided), and thelang
(language) preference of the user.
How To Provide Fees?
Currently, it's recommended to provide fees/exchange rates in the iFrame/web view of your application.
SEP-24 standard provides a /fee
endpoint to allow businesses to set static fees for their transactions. However, it's not currently supported by the Anchor Platform.
/fee endpoint will be deprecated in the future.
How to identify the user account?
You should use the sub
field of the JWT token. For custodial wallets, this value will be in the format account:memo
. Use the memo to identity the user. For noncustodial wallets, simply use the sub
value itself, which will be equal to the user account.
How to identify the wallet?
Utilize the data.client_domain
attributes within the JWT token. In the presence of clients configuration, the JWT token will additionally incorporate the data.client_name
field, enabling wallet identification.