React Native SDK - Connect(V2)
Integrate the PortOne React Native SDK to start accepting payments via PortOne.
#
Integrate with React Native SDKThe PortOne React Native SDK allows merchants to seamlessly integrate the PortOne Payment Gateway into their React Native applications, enabling secure and efficient payment processing.
#
Video TutorialFor a detailed guide on integrating the PortOne iOS SDK and using a payment method flow, refer to the following video tutorial
#
Sample AppCheck out the sample app for integration on GitHub.
#
PrerequisitesCreate a PortOne Account
- Sign up on PortOne to access services and functionalities.
Access API Keys
- Log in to the PortOne portal to obtain API Keys (client key and secret key) under Settings -> API tab.
Enable Payment Channels and Methods
- Customize and enable payment channels and methods as per your requirements.
React Native Application
- Ensure you have a React Native application ready for SDK integration.
#
Integration#
1. Enable Deep Link in iOSAdd URL schemes and identifier in info.plist
Include URL schemes in info.plist to open other applications
Add HTTP connection support in info.plist
#
2. Enable Deep Link in AndroidAdd an intent filter in AndroidManifest.xml
#
3. Install the SDKAdd .npmrc file to the project directory
Install the SDK and peer dependencies
#
4. Obtain JWT TokenGenerate a JWT token using
portoneKey
on the server.Retrieve and store the JWT token securely in your iOS app.
For more details, refer to Authentication | PortOne.
#
5. Generate Signature HashGenerate a Signature Hash using HmacSHA256 for inclusion in the payload. For details, refer to Payment Request | PortOne.
#
6. Initialize PortOne RN SDKImport the SDK library
Initialize the checkout instance
#
Payment Methods#
New Credit Card PaymentCollect card details and use the
startPaymentWithNewCard
methodHandle the web view response in
afterCheckout
#
Saved Card PaymentUse the
startPaymentWithSavedCard
method
#
Wallet PaymentUse the
startPaymentWithWallets
method
#
Non-Tokenized PaymentUse the
startPaymentWithoutTokenization
method
#
Fetch Available Payment MethodsUse the
getAvailablePaymentMethods
method
#
Merchant-Centric Card VaultAdd Card for Customer
Delete Card for Customer
Fetch Customer Cards
Add Customer
Get Customer Data
#
Failover RoutingEnable failover routing in payload
Fetch list of routes
#
PreAuth and Capture PaymentPre-Authorization
Capture Payment
#
Payload ParametersParameter | Data Type | Mandatory |
---|---|---|
portOneKey | String | Yes |
merchantDetails | Object | No |
merchantOrderId | String | Yes |
signatureHash | String | Yes |
amount | Double | Yes |
currency | String | Yes |
countryCode | String | Yes |
billingDetails | Object | No |
shippingDetails | Object | No |
orderDetails | Array | No |
successUrl | String | Yes |
failureUrl | String | Yes |
expiryHours | Int | Yes |
source | String | Yes |
description | String | No |
showShippingDetails | Boolean | No |
showBackButton | Boolean | No |
defaultGuestCheckout | Boolean | No |
isCheckoutEmbed | Boolean | No |
redirectUrl | String | Yes |
environment | String | Yes |
MerchantDetails
Parameter | Data Type | Optional |
---|---|---|
name | String | Yes |
logo | String | Yes |
returnUrl | String | Yes |
merchantId | String | No |
| mcc | String | No |
OrderDetails
Parameter | Data Type | Optional |
---|---|---|
title | String | Yes |
description | String | Yes |
quantity | Int | Yes |
price | Double | Yes |
BillingDetails
Parameter | Data Type | Optional |
---|---|---|
address | String | Yes |
city | String | Yes |
country | String | Yes |
postalCode | String | Yes |
phone | String | Yes |
ShippingDetails
Parameter | Data Type | Optional |
---|---|---|
address | String | Yes |
city | String | Yes |
country | String | Yes |
postalCode | String | Yes |
phone | String | Yes |
#
SupportFor additional support or questions, please contact the PortOne support team.