Define the plan and attach the payment definitions and merchant preferences. More Information: https://developer.paypal.com/webapps/developer/docs/api/#create-a-plan
Define the merchant preferences. More Information: https://developer.paypal.com/webapps/developer/docs/api/#merchantpreferences-object
Define a trial plan that will only charge $9.99 for the first month. After that, the standard plan will take over for the remaining 11 months of the year.
Define the standard payment plan. It will represent a monthly plan for $19.99 USD that charges once month for 11 months.
NOTE: For
IFNINITE
type plans,cycles
should be 0 for aREGULAR
PaymentDefinition
object.
Pass in a APIContext
object to authenticate
the call and to send a unique request id
(that ensures idempotency). The SDK generates
a request id if you do not pass one explicitly.
See Configuration.cs to know more about APIContext.
Call plan.Create()
to create the billing plan resource.
For more information, please visit PayPal Developer REST API Reference.
Create the Billing Plan
Both the trial and standard plans will use the same shipping charge for this example, so for simplicity we'll create a single object to use with both payment definitions.