Setup and process payment plan - Hosted Solutions
Process an Initial payment
Step 1: Tokenize in Paysafe JS or Setup in Paysafe Checkout the cardholder payment information and provide the following fields in the threeDS object:
- Set authenticationPurpose to be RECURRING_TRANSACTION or PAYMENT_TRANSACTION.
- Set requestorChallengePreference to
- CHALLENGE_MANDATED for EU/UK issued cards, as the cardholders are mandatory to pass authentication challenge for establishing a payment plan.
- CHALLENGE_REQUESTED for cards that are issued in non-regulated region, if you want the cardholders to pass authentication challenge. Although authentication may not be mandatory, it has the potential to improve the acceptance rate of the subsequent payments.
- Set the billingCycle with the necessary details. The field is required if authenticationPurpose is set to RECURRING_TRANSACTION.
A payment token will be returned to you.
Step 2: Proceed with an authorization request to the Paysafe Cards API:
Call the following endpoint from your server '/cardpayments/v1/accounts/account_id/auths' and:
- Add the storedCredential object to the authorization with the appropriate type (RECURRING, TOPUP or ADHOC) and occurrence set to INITIAL to indicate the initial payment.
- Include the payment token.
- Fill in the other necessary details for the authorization request and proceed with it.
If you receive a successful payment response it means that the payment plan was successfully established. You must store the Transaction ID in your back office, as you must supply it in field initialTransactionId (storedCredential object) with each subsequent merchant-initiated rebilling for the same payment plan.
Step 3: Create a customer profile in the Customer Vault to retrieve a permanent payment token that will be used for the future recurring payments with the single-use payment token that was used for the initial transaction.
A cardholder may also establish a payment plan with previously saved card. In this case, the Saved Cards Integration for Paysafe JS or Showing saved cards and Paying with saved card for Paysafe Checkout can be used for selecting the card.
Process a Subsequent Payment
Process Merchant-Initiated Credentials-On-File (RECURRING and TOPUP) transactions
Initiate an authorization request to the Paysafe Cards API and:
- Include the storedCredential object with type (RECURRING or TOPUP), occurrence set to SUBSEQUENT and initialTransactionId. The initialTransactionId is the Paysafe Transaction ID that was returned to you with the initial authorization confirmation.
If the initial authorization was processed outside of Paysafe environment, you can supply the Scheme Transaction ID of the initial authorization in field externalInitialTransactionId. - Include the payment token with which the initial authorization was processed.
- Fill in the other necessary details for the authorization request and proceed with it.
Process ADHOC Cardholder-Initiated Credentials-On-File transactions
The Paysafe Customer Vault API can be used for storing the profiles and card payment methods or bank account details of customers who have registered on your website and are frequent users of your service. In this scenario, each new purchase should be treated as a new payment request and not as a repeat billing or subscription transaction.
To process a subsequent customer-initiated credentials-on-file subsequent request, you will need to refer to:
- Saved Cards Integration for Paysafe JS or
- Showing saved cards and Paying with saved card for Paysafe Checkout