Skip to main content
Use the funding work ID from payment submission to show the customer where their payment stands and decide when to fulfill their order. Funding deposits the sender’s tokens. Settlement credits the recipient’s TIN.

Read the funding work

Set TSN_RECEIVER_URL to the URL used for payment submission and FUNDING_WORK_ID to the saved work ID. Use the ID from your test payment.
Look at the top-level status for funding and settlement.status for the credit. settlement is null before the signed deposit is attached. For a 404, check the saved work ID and Receiver URL before retrying.

Show the checkout state

Verify the payment before fulfillment

Copy payment-flow.ts and its dependency credit-deposit.ts into your project. On your backend, pass the funding work ID saved against the order and your configured Receiver and Solana RPC URLs. This check can run after a browser refresh because it uses the saved ID. Payment helper · Deposit helper
check-payment.ts
finalized is true when Receiver reports both transactions confirmed, gives distinct signatures, and the Solana RPC reports both signatures finalized without execution errors. Fulfill the order once per order ID after that check passes. Treat a request error as an unavailable status check and try reading the same work again.

Status and reconciliation

If the app loses a response, resume from the original work ID and retain any signed completion for an exact retry. If funding confirmed and settlement stopped, keep the existing deposit and have the operator inspect the linked settlement. See safe retries and Receiver recovery. To show the recipient’s updated balance, use the owner-authorized balance guide. Read a TIN balance