PayPal Wallet
Prerequisites
All prerequisites and authorization required for Paypal shall be completed by merchant.
Account creation with Paypal
Configure the merchant ID, Client ID and Secret Key provided by Paypal on Juspay Dashboard
Get the latest SDK from Paypal
Dependencies
Ensure that dependency is added for the Paypal SDK.
User Experience for Paypal Link & Pay
First time transaction: The user will be redirected to Paypal page on Chrome custom tab/ CCT. The user shall login into paypal account, add his/her credit or debit card , get redirected to the bank page and enter the OTP for payment completion.
Recurring Transaction (Credit card linked): If the user has completed the login and added a credit card, the repeat transaction will directly debit the credit card. Login step and OTP step shall be skipped. Applicable only for transactions for amount less than Rs.2000
Recurring Transaction (Debit card linked): If the user has completed the login and added a debit card, the repeat transaction will skip the login step. However users will have to enter the OTP in case of debit cards.
Step 1 - Customer context creation
Create or Get
Customer on the Juspay Server. It is recommended to make this API call before opening the payment page.
Step 2 - Order creation
Create Order on the Juspay Server. Kindly ensure that
metadata.PAYPAL:direct_wallet_version:v2 is passed during order creation
More Paypal specific metadata parameters to be passed during order creation.
Customer ID to be passed during order creation
Step 3 - Refresh wallet balances
Use the refreshWalletBalances call to get the list of wallets available for the user. The response shall provide information on:
Whether Paypal wallet is already linked for the customer
The direct wallet token obtained in the response shall be used in the walletTxn call.
Step 4 - Initiate wallet transaction
Use walletTxn operation to initiate Paypal transaction. Please note to send the below three parameters for the walletTxn operation.
paymentMethod :: PAYPAL
shouldLink :: true (if the wallet needs to be linked)
sdkPresent :: ANDROID_PAYPAL
directWalletToken :: Required for recurring transactions
NotePlease refer to Wallet Txn - SDK flows for request payload corresponding to the required flow (Direct debit and First time linking)
The request payload given here is for Redirection flow

