React Native SDK(v3) - Checkout
Please follow steps below to setup React Native SDK and start accepting payment via PortOne.
For initial SDK installation set up refer here
#
React Native Payment SDK v3Included the SDK checkout UI in the Mobile SDK.
- Import the library as below:
- Initialize the checkout instance as below:
- Create the reference for checkout
To create the payment link, generate the JWT token
Generate the JWT token:
- create the JWT token using the payload and portone secretKey
- payload:Details
- payload:
- Algorithm to use for generating token - “HS256”
To get the payment link to use the SDK checkout UI, call the openCheckoutUI method from SDK as below:
Sample Payload:
Sample JWT token:
- Web view response will be given back to the callbackFunction
Sample response :
- Success Case
- Failure case