Setup and process payment plan - Server to Server
Process an Initial payment
You can process recurring payments with credentials-on-file saved on merchant premises or on Paysafe premises (with payment token from Customer Vault).
Step 1: Initial authentication with Paysafe 3D Secure REST API:
- 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.
- Include the card details or the payment token if Customer Vault API is being used.
- Fill in the other applicable details for the authentication request and proceed with it.
Note that SCA exemptions cannot be used for establishment of recurring payment plan.
Step 2: Initial authorization with Paysafe Cards API, once the authentication request is completed and is successful:
- 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 card details or the payment token from the Customer Vault API with which the authentication was processed.
- Fill in the other necessary details for the authorization request and proceed with it.
If you receive a successful payment response, 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.
The payment plan is established upon successful authorization request, and you may now proceed to Process a Subsequent Payment.
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 card details or 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
Step 1: Authentication with Paysafe 3D Secure REST API:
- Set authenticationPurpose to be PAYMENT_TRANSACTION.
- Set requestorChallengePreference to
- CHALLENGE_REQUESTED 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.
- NO_PREFERENCE if you don't have preferences around the authentication flow.
- Include the card details or the payment token (from Customer Vault API) with which the initial authorization was processed.
- Fill in the other applicable details for the authentication request and proceed with it.
Step 2: Authorization with Paysafe Cards API, once the authentication request is completed and is successful:
- Add the storedCredential object to the authorization with type ADHOC, occurrence set to SUBSEQUENT and initialTransactionId. The initialTransactionId is the Paysafe Transaction ID that was returned to you with the initial authorization confirmation.
- Include the card details or the payment token from the Customer Vault API with which the authentication was processed.
- Fill in the other necessary details for the authorization request and proceed with it.