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.
Related
We are studying the feasibility of using Braintree as a payment gateway for one of our client.
One of our requirement is to create a persistent customer with specific payment method/s (paypal, credit/debit etc) using
Braintree Java API.
This registered customer account will then be debited and amount transferred to the client's account as and when need arises.
We have following queries.
Is there any constraint/limitation as to the country to which the customer can belong to? For example, can we create a
customer in Braintree who is a resident of India or China? Can Braintree transfer amount from a customer's account in India
to client/merchant's account in USA and vice versa?
In Braintree sandbox account we can create a new customer with credit card as a payment method. How can we
create a customer with Paypal as a payment method in sandbox?
I have gone through the Braintree Customer.create() Java API. Using Customer.create() API we can create a new customer
with credit card details. But how can we create a new customer with Paypal details using API call? Where can we provide customer's
Paypal account details while calling Customer.create()?
Once customer is created and payment method details verified by customer can subsequent amount transfers from customer to
client/merchant's account happen without customer have to authorize each transaction?
Thanks.
I try to answer your questions but I'm not Braintree ninja.
I think yes but there would be some charges on top of normal fees (known as currency conversion charges).
You can't create paypal as payment method in sandbox (I don't know the reason) but you can in production account.
When users choose Paypal as payment, after successful authentication a token is returned that you can save in database for future transactions (without authentication).
I didn't get your last question, let me answer what I understood(I guess you mean authentication again or providing details again). If customer agrees to have payment method vaulted then no, they won't have to authorize transactions in future as long as they don't cancel their payment method.
Update: Forgot to answer the first part of your question No. 1, as per their FAQs Braintree accepts payments from almost everywhere.
For a new project I want to get rid of paypal subscriptions as users tend to subscribe multiple times and then dispute all payments.
Instead I want to use reference transactions to bill the clients when necessary.
Now with the regular checkout or subscriptions users didn't have to have a Paypal account to purchase. They could just enter credit card details and start the subscriptions.
With reference transactions I can only see a paypal login page where a user gives permission for the reference transaction.
Is there a way to enable reference transactions for users without a Paypal account that just have a credit card? Or is there something similar that could achieve this?
In order to use Reference Transactions PayPal Accounts are required and not allowed for Guest Checkout option (no work around).
The alternative to this would be to upgrade using Payflow APIs where a PNREF is used in this scenario on future payments. Or BrainTree's future payments using vault. These options are direct Credit Card processing only.
Recap - PayPal accounts needed for PayPal Reference Transactions
Payments Pro has a reference transaction system. Typically you run an authorization for $1 and then void it. Then you can run a reference transaction on the previous transaction ID.
Payments Pro is a subscription service.
i understand we can store our client credit card information by paypay restful api by vault.
My questions are:
I tried this solution already in my paypal sandbox and it looks fine. But before executing this payment, it seems no approval is needed from my client. Is it normal?
Can I store this card id and charge my client in the future? Can I schedule some scripts to charge my client on weekly basis without their approval by vault method?
It is like recurring billing?
From this link
https://developer.paypal.com/webapps/developer/docs/integration/direct/rest_api_payment_country_currency_support/#direct-credit-card-payments
paypal said Direct Credit Card Payments is only available in US and UK.
I am not in UK neither US.
Can I use vault to charge my client?
Thanks.
That is normal, you should get the approval when you are storing the card, explaining to the user what they are consenting to. Within the valid_until range as in https://developer.paypal.com/webapps/developer/docs/integration/direct/store-a-credit-card/ , you should not need additional approval for charges.
You can store the card token and charge client in the future, in effect achieving something similar to recurring billing. https://github.com/paypal/rest-api-sdk-nodejs/issues/3#issuecomment-37940026
That is correct, you can only use direct credit card payments (which includes Vault) only in the US and UK for now.
my requirement is to store users credit card information to pay-later. whether there is any option in paypal to store users credit-card information and pay it later or is there any options for this in any payment methods
Auth.Net's CIM is a viable option, but it is not a standard feature of an Auth.Net account and requires an extra fee each month to use. Depending on the PayPal payment method you're using, you can get a similar feature for free through reference transactions or billing agreements.
For up to a year after processing a credit card payment at PayPal, you can generate a follow-up reference transaction that uses the same payment details previously used to capture new money. If your customer paid using a PayPal account balance, you can establish a billing agreement that lets you charge their card at an arbitrary time in the future as well.
As far as I know, neither one of these features requires additional payment on your behalf. You just have to have a PayPal account that supports the API you want to use and know how to integrate it.
Yes. You would need to the use Authorize.Net's Customer Information Manager (CIM) API which allows you to store payment information as a payment profile on their server. You can then charge against it at any point in the future.
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.