diff --git a/README.md b/README.md index 5593dcd..7af7a4d 100644 --- a/README.md +++ b/README.md @@ -102,11 +102,38 @@ const Checkout = () => { }; ``` +### Resume transaction +

The resume transaction flow allows you to initiate a transaction on your server and complete it in the app. This flow provides both the security of server initialization and the convenience of the user experience in the app. +

+ +```tsx +import React from 'react'; +import { Button } from 'react-native'; +import { usePaystack } from 'react-native-paystack-webview'; + +const ResumeTransaction = () => { + const { popup } = usePaystack(); + + const resumePayment = () => { + popup.resumeTransaction({ + accessCode: 'ACCESS_CODE_FROM_PAYSTACK', + onSuccess: (res) => console.log('Payment resumed successfully:', res), + onCancel: () => console.log('User cancelled'), + onLoad: (res) => console.log('WebView Loaded:', res), + onError: (err) => console.log('WebView Error:', err) + }); + }; + + return