Creates a PayPal billing agreement session without requiring an immediate purchase.
Configuration options for the billing agreement session
A session object that can be used to start the billing agreement flow
This method is legacy and should not be used for new implementations. Use the newer vault setup token approach with PayPalPaymentsInstance.createPayPalSavePaymentSession instead.
This legacy method allows merchants to set up recurring payment agreements with customers that can be used for future transactions.
const billingSession = sdkInstance.createPayPalBillingAgreementWithoutPurchase({
billingToken: 'your-billing-token',
onApprove: (data) => {
console.log('Billing agreement approved:', data);
},
onCancel: () => {
console.log('Billing agreement canceled');
},
onError: (data) => {
console.error('Billing agreement error:', data);
}
});
Interface for PayPal legacy billing agreement functionality.
Deprecated
This interface provides legacy billing agreement methods that should not be used for new implementations. Use the newer vault setup token approach with PayPalPaymentsInstance.createPayPalSavePaymentSession instead.
Remarks
Provides methods for creating billing agreements without requiring an immediate purchase. This legacy interface allows merchants to set up recurring payment agreements with customers that can be used for future transactions.
Example
See
PayPalPaymentsInstance.createPayPalSavePaymentSession For the recommended modern approach