client.setupApplePay(), client.setupGooglePay(), or client.setupBuy() emits complete) to poll for the final transaction status.
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.
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
Webhook support is coming soon. Until then, use polling to track transaction
status.