react-paystack icon indicating copy to clipboard operation
react-paystack copied to clipboard

pass in access code to either Popup or Button to retrieves the transaction details,

Open ogheneovo12 opened this issue 1 year ago • 3 comments

I know the mobile SDK already has the feature, is there a way to replicate on the web, i want to be able to initialize a transaction at the backend, retrieve the access code from the initialized transaction, return the access code to the client where the client can then pass it to either the popup or the paystack button, and the transaction details associated with the access code will be automatically fetched for the popup.

ogheneovo12 avatar Jul 07 '23 06:07 ogheneovo12

Can you send a link to the mobile SDK. because to fetch transaction details, you need the transaction's id not access code link. Also what are the possible use cases for this feature, If a transaction has been initialized why do we still need to see it in the client?

Nelwhix avatar Jul 08 '23 05:07 Nelwhix

Similar to the way one of stripe flow works:- create a transaction session at the backend, with all the accurate information (user info, all necessary price calculation), this is done on the server for reliability.. return the session id and a checkout url, so on the web, pass the session id to the payment element (in Paystack React Popup Element), and information associated with that sessionId (transactionId), is populated on the popup, so i don't need to initialize the transaction on the client anymore.

ogheneovo12 avatar Aug 06 '23 18:08 ogheneovo12

Can you send a link to the mobile SDK. because to fetch transaction details, you need the transaction's id not access code link. Also what are the possible use cases for this feature, If a transaction has been initialized why do we still need to see it in the client?

Link to the android sdk https://github.com/PaystackHQ/paystack-android

ogheneovo12 avatar Aug 06 '23 18:08 ogheneovo12