The
getPaymentStatus function allows you to check the status of a payment transaction after it has been submitted. Use this to track whether a payment has been completed, is still pending, or has failed.Try it out: Test the getPaymentStatus function interactively in our Base Pay SDK Playground.Parameters
Transaction hash from the pay result that you want to check the status of.Pattern:
^0x[0-9a-fA-F]{64}$Must match the testnet setting used in the original pay call. Default: false
Returns
Payment status information including current state and details.
Error Handling
ThegetPaymentStatus function can throw errors for:
- Invalid transaction ID format
- Network connection issues
- Transaction not found
getPaymentStatus in a try-catch block to handle these errors gracefully.