Skip to main content
Version: 2.9

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:

  1. exp is the expiration time of the token. You should check that the provided token has not expired.
  2. 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.
  3. jti is the hash of the transaction.
  4. data is the extra payload that has been set by the user. It will always contain the Stellar asset wants to deposit or withdraw. If provided by the client, it will also contain the amount the user wants to transact, the client_domain of the wallet verified during SEP-10 authentication, and client_name (defined as 'name' in clients configuration if provided), and the lang (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.

note

/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.