<MoonPayBuyButton> or client.setupBuy() emits complete) to poll for the final transaction status.
For bank-transfer payments (SEPA), this endpoint also returns the deposit details your app renders so the customer can pay. See Bank-transfer deposit details.
For request and response details, see the Get a transaction API.
Get a transaction
Parameters
client.getTransaction() takes a single positional argument.
This method does not require a separate auth token. The client uses stored credentials from an active connection.
Result
client.getTransaction() returns a Result<{ data: TransactionWithStages }, GetTransactionsError>.
Result envelope
Result<{ data: TransactionWithStages }, GetTransactionsError>
TransactionWithStages
A transaction with its stage breakdown. See the Transaction object for every field, and the Get a transaction API for the response shape.
Bank-transfer deposit details
Bank-transfer payments (SEPA) settle when the customer sends funds to a MoonPay bank account. For these transactions, the response includes abankTransferDepositInfo object with the account details and the payment reference. The transaction’s source.amount (with source.asset.code) is the exact fiat amount the customer must send; render it alongside the deposit details.
Bank transfers are a floating payment method: the crypto amount is only final at settlement. While the transaction is pending, its destination.amount is a floating estimate, the same estimate the quote returns, so you don’t need to retain the original quote. Render destination.amount with a tilde, making clear it’s an estimate until the transfer lands. At settlement it becomes the final amount delivered. See Exchange rate type.
Your app renders these details natively so the customer can complete the transfer from their banking app. MoonPay does not render the deposit UI. Read the fields from bankTransferDepositInfo and display them in your own screen, then keep polling client.getTransaction() to track the transaction to a terminal status.
Show the customer the exact
reference value. MoonPay uses it to match the
incoming transfer to this transaction. A missing or altered reference means
the transfer is rejected.GetTransactionsError
GetTransactionsError is the standard MoonPay Platform API error shape, DevPlatformApiError.
Example: poll until terminal status
After a payment flow emitscomplete, poll client.getTransaction() until the transaction reaches a terminal status. The set of terminal statuses depends on the flow — check the Transaction object reference for the values that apply.
Poll for final status
Poll this endpoint to track status, or use the existing
transaction-updated
webhook if you already consume MoonPay webhooks. Bank-transfer transactions
stay pending from creation until they settle. When the customer’s deposit
arrives, the status is still pending, so check the stages array: when
the waiting_payment stage’s status is "success", the deposit has
arrived.