I've created some billing plans and now I want to override the payment definitions when creating the billing agreement. Is that possible?
I know that I can override the merchant preferences and the charge models but I haven't found anything to override the payment definitions.
The use case would be a user that subscribes a service (billing plan) but with a discount associated.
I'm using the REST API.
Possible solution:
Create a billing agreement with override_merchant_preferences. (initial amount)
After creating the billing agreement - get agreement_id
Update the billing agreement with patch_request (recurring amount)
Update on April 2019:
On April 2019, PayPal added new Subscriptions API.
https://developer.paypal.com/docs/subscriptions/integrate/
New API supports revising current subscriptions.
https://developer.paypal.com/docs/subscriptions/full-integration/subscription-management/#revise-subscription
Related
Let's say I have a service where a user can subscribe for:
$10/Month
$25/Month
$50/Year
Am I correct that to set this up properly with PayPal's API, I should:
Create three Billing Plans - one Billing Plan for each payment tier
Activate each Billing Plan
When a customer subscribes, they create a Billing Agreement under one of the preexisting Billing Plans and go through the authorization process? Thus, multiple customers would have agreements under say the $10/Month Billing Plan?
I'm further confused because, astonishingly, there is no way to use the API to list all of the Agreements: https://github.com/paypal/PayPal-REST-API-issues/issues/5
When a customer subscribes, they create a Billing Agreement under one of the preexisting Billing Plans and go through the authorization process? Thus, multiple customers would have agreements under say the $10/Month Billing Plan?
Yeah, that's right.
Because there is no API to list all of the agreements, so you could create a billing plan every time a customer subscribes. Then you would be able to list all of the billing plans you created.
GET /v1/payments/billing-plans
https://developer.paypal.com/docs/api/payments.billing-plans/v1/#billing-plans_list
In my website, I am using Braintree payment gateway for both card payments and PayPal transactions with auto renewal subscriptions.
i am creating the customer and storing the card in Braintree vault for auto renewal..
also using the same customer id for that customer PayPal transactions (if happened)
before proceeding the payment, just need to check for active subscription, for both auto renewable and auto renewal cancelled and still expiration date is due subscription existence.
is there any predefined methods for verifying that one with .net code?
I am new to payments, is there any recommended git projects available? so that it would helps a lot
thanks in advance.
It sounds like you want to find active subscriptions for a given customer. According to this answer, "customers have a credit_cards array, and each credit card has a subscriptions array."
With that in mind, you can iterate through each credit card to grab each subscription. Once you have all the customer's subscriptions you can check their status. Here are the relevant Braintree Developer Docs links for .NET:
customer.CreditCards
creditCard.Subscriptions
subscription.Status
You can get a customer by id with the customer.find(id) method. It will return the customer with a paymentMethods property which contain the subscriptions associated with it.
I need to setup an invoice in Paypal with:
A subscription of 15, 20 or 25 USD a month
With an initial setup fee of 15, 50 or 100 USD (This amount comes from a third party, I cannot predict it)
Can I achieve this with a single PayPal invoice?
Also need to achieve it with Stripe, all help is appreciated.
With Stripe, you can add a setup fee to your subscription like this:
Create the customer object using a token or source created by Elements or Checkout.
Create an invoice item with the value of the setup fee.
Create the subscription.
When the subscription is created, a first invoice will be created immediately and it will include the item created in step 2 in addition to the subscription's base cost.
With PayPal, there is a setup_fee variable you can add to the Billing Plan by specifying it in the merchant_preferences object.
Here is the integration information on Billing Plans and Billing Agreements. Click on Create a Plan to see an example which uses setup_fee.
https://developer.paypal.com/docs/integration/direct/billing-plans-and-agreements/#integration-steps
I want to implement paypal recurring payments using angular2. I have successfully included the button for express checkout which works perfectly, but i don't have an idea of the api to use for recurring payments.
When i try to use checkout.js with this code
paypal.billingPlan.create(billingPlanAttributes, function (error, billingPlan) {
...
})
I get billingPlan is not defined. Has anybody done this successfully, please let me know.
The correct way to do Recurring payment in REST API with Paypal is that you are required to have an active billing plans.
The orders are ;
Create Billing Plans
Update Billing Plans to Active
Call Billing Agreement.
In your cases, you need an active billing plans before calling the billing agreement. PayPal use the billing plans to define the billing agreement between buyer and seller.
I'm trying to implement PayPal on a completely custom shopping cart and have been unable to figure out which API for recurring payments we need.
We ship a physical product every 2, 3, 4, 6 months so shipment and payment have to both happen together. In addition it must be easy for the user to change their shipment date - or add or remove items to their regular shipments without too much stress (either on their part or mine).
I've generally looked at Paypal's recurring billing as more suited to software based subscriptions and I don't think this is the API I need. I'd like to just bill the customer via a billing agreement and then initiate the shipment.
The way Skype does it seems to be ideal - they establish a billing agreement (shown in my PayPal account under 'My account > Profile > Pay List'
but I cannot seem to find that in the SOAP API document.
What is the API I need to create a billing agreement that I can trigger whenever I want. Can this be done with Express Checkout API ?
The API you are looking for is called reference transactions. This allows you to set up a billing agreement with a customer, get back a token, and then use that token to issue charges in the future. It can be done via the Express Checkout API.
You have to contact PayPal customer support to get this activated for your account before you can use it.