Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

Create Recurring Payments Profile

drewjoh edited this page Apr 11, 2011 · 1 revision

Example: Create recurring payments profile using Direct Payment method.

This is different from the often highlighted and "recommended" way using PayPal Express Checkout.

$paypal = new Paypal();

$paypal->first_name		= $first_name;
$paypal->last_name		= $last_name;
$paypal->profile_start_date	= date('c'); // Must be ISO 8601 date format
$paypal->amount			= '30.00';
$paypal->billing_period		= 'Month';
$paypal->billing_frequency	= '1';
$paypal->description		= 'This is a description of the subscription.';

$paypal->email			= $business_email; // Optional

$paypal->credit_card_number	= '123456578901';
$paypal->credit_card_type	= 'Visa';
$paypal->expire_date		= 'MMYYYY';

$paypal->initial_amount         = '75.00'; // OPTIONAL

$paypal->create_recurring_payments_profile();

See PayPal documentation for values of profile_start_date, billing_period and an explanation of billing_frequency.