Pay3 React Native SDK
Event Listeners
3min
introduction after completing transactions in pay3 sdk ui, the pay3 sdk publishes events to app pay3 sdk transaction status this event is fired by pay3 sdk on completion of checkout transaction triggered by checkout webview pay3 gecheckoutwebview() payload data (type object) following keys are present in this object status (type string) the status can have values success or error message (type string) user friendly message returned after completion of the transaction orderid (type string) pay3 order id requestid (type string) unique id passed by app error (type object, optional) following keys will be present if there is an error please refer to sdk errors docid\ upvtc67wkwgncscjvaq0v for reference code (type number) error code message (type string) error message index js pay3 on('pay3 sdk transaction status', (payload any) => { // add your custom logic to handle the transaction status setpay3checkoutvisiblestate(false); // can be used to hide the checkout webview }, ); sample event { "data" { "message" "transaction completed successfully", "orderid" "7a38ee7f d5a9 45c8 af6b e75d4190722a", "receipt" "txnreceipt", "requestid" "252425", "status" "success" }, "ts" 1706087047736 }