Before we can setup the billing agreement, we must first create a billing plan that includes a redirect URL back to this test server.
Activate the plan
With the plan created and activated, we can now create the billing agreement.
Create the billing agreement.
Get the redirect URL to allow the user to be redirected to PayPal to accept the agreement.
Api Context
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.