Skip to main content
To confirm the outcome of a swap started from the Hosted Page, check its status through the Layerswap API.

Correlate with externalId

Add a unique externalId when you construct the Hosted Page URL:
The created swap stores this value as reference_id. Store the session ID with the user action in your backend. When you list that user’s swaps with GET /swaps, match swap.metadata.reference_id to your stored value and then track the matching swap by ID. Use a unique externalId for each user flow and store the matching swap ID. Reusing a reference can replace an unfunded swap or reject creation; see Reference IDs and repeated requests.

Track by transaction hash

If your application knows the user’s funding transaction hash, call:
Then poll GET /swaps/{id} until the swap reaches a terminal state. See Track swaps and Swap lifecycle & statuses.

Let users inspect progress

Link users to the Layerswap Explorer and let them search by swap or transaction identifier. This is useful for support and visibility, but your backend should still verify the API status before crediting a balance or fulfilling an order.