Stripe: Card accepted in Platform account but declined in Connected account at the same time - stripe-payments

We use Stripe Connect API to:
create customer + card in Platform account
clone the customer + card into Connected account
charge the card in Connected account
All steps are executed immidiately one after another.
Step 1. suceeds (the card is valid in Platform account), but step 2. fails with "card is declined".
The card is valid in platform Stripe account but declined in connected Stripe account, at the same time.
Stripe support didn't provided any useful info, they referred us to declined card help page:
the only way to resolve this is to ask your customer to reach out to their card-issuing bank to look at the transaction and determine why it was declined.
Unfortunately, We cannot ask the customer to help us.
Did anyone else encountered similar problem?

Declines are common and to be expected. They can be for a number of reasons (e.g. region of the connected account, card brand, supported merchant codes on the card, past card usage history and many more reasons) which are ultimately up to the card issuing bank.
To clarify, when you say
Step 1. suceeds (the card is valid in Platform account),
Just because a card succeeds being attached to a Customer does not mean that that card should be expected to work successfully going forward. Goes back to that this is up to the issuing bank and the best thing to do is prompt your end customer to use a different card.

Related

Stripe - How to get purchaser's information for a charge with Connect (Express)?

I've set up a test charge using stripe.Charge.create() and it is working, i.e. I can see the dollar amounts processed in the Connect test dashboard. It appears to be money going from the tok_visa to a dummy Stripe account I set up.
charge = stripe.Charge.create(
amount=1000,
currency="usd",
source="tok_visa",
application_fee_amount=123,
transfer_data={
"destination": "{{CONNECTED_STRIPE_ACCOUNT_ID}}",
}
)
For a marketplace type platform, I need to be able to send funds from the purchasing user to the selling user, however.
Would I need to get the purchaser's account (or some other object?) to use as the "source" in the charge?
How do I get that to put it into the "source" field?
I feel a little lost in Stripe's docs, so I could be missing something. Thank you for any tips.
I need to be able to send funds from the purchasing user to the
selling user, however
If by 'purchasing user' you mean a cardholder customer of your marketplace, this is exactly what you have. tok_visa here represents a credit card, that you accept through a payment page.
If instead you mean, the purchasing user is another connected account in the marketplace, you can either :
use an account debit to debit one account, and then transfer to
another.
collect a card from users when they sign up and create a
Customer object for them. You can then charge that customer as needed
like in your example code. You need to maintain a link in your system that
'customer cus_xxx is also my marketplace user acct_xxx'

Check if existing stripe customer's cards are still valid

I have an application which uses Stripe. Stripe stores credit card information for every customer. Some of these cards are already expired and not valid anymore.
How can I go through all customers and validate their credit cards (if they are still valid or not)?
In many cases, Stripe will automatically update the cards: https://stripe.com/blog/smarter-saved-cards.
Otherwise, there is no way of checking that a saved card is still valid short of trying to charge it. But you should not try to create charges just to test if a card is still valid -- the credit card networks rules and Stripe's own ToS forbid from creating charges that are not for the actual selling of a good or service.
From Stripe documentation
In many cases, Stripe will automatically update the cards: https://stripe.com/blog/smarter-saved-cards.
Otherwise, there is no way of checking that a saved card is still valid short of trying to charge it. But you should not try to create charges just to test if a card is still valid -- the credit card networks rules and Stripe's own ToS forbid from creating charges that are not for the actual selling of a good or service.
Although you can always test the card without charging using the "save card" function
More here - https://support.stripe.com/questions/check-if-a-card-is-valid-without-a-charge

How is saving a Stripe Customers Card Info in a Customer Object secure on the client side, even with tokens?

I want to have the customer enter their card info once and have a "pay now" button that will save the users info for future payments without them having to reenter there info and stripe says this can be done if you create them in a user object.
When the user is entering their info in and saving it in a user object where it saves on the stripe side, I dont understand how this is secure, even with tokens. Couldn't the developer add another function to go along with the stripe custom forms 'submit' or 'pay now' to send the card info somewhere else before or simultaneously while stripe is generates the token? And if I want, can I have the last four digits be displayed of their "current card" in my hybrid ionic app? Can someone please explain to me what I'm missing?
Im sending the customers payment token over the wire for a affiliate to process the payment (my apps only on the client side), and because share the token does not put the card at risk, are there any security concerns I should be aware about?
Yes, a nefarious developer could easily do whatever he wants with the customer's credit card information and that would have nothing to do with Stripe. Stripe and every other payment processor assumes that its developers/clients are not using their services for malicious reasons and I'm sure if such evidence surfaced their account would immediately be revoked.
Stripe's security model allows developers to trust Stripe to store their customers' credit card numbers securely for them so that they can focus on developing their product, not worrying about building a PCI-compliant credit card database store. The idea is you hand over a customer credit card number to Stripe in exchange for a token (customer ID) which you later reference when making subsequent charges to that customer's card.
As for the last 4 digits of the card, yes that is easily obtainable via the Stripe API
https://stripe.com/docs/api#cards

API to change the credit card used by a google wallet subscription?

Again I am frustrated by the lack of documentation involved in developing using Google Wallet as a payment gateway and I may switch to another service.
My new question is as follows:
Can I programmatically change the payment card utilized by a Google Wallet for digital goods subscription?
If a card utilized in a subscription expires, that is on the user, However, If I do not provide a means of changing the payment card elegantly, that is on me!
Does anyone know how this can be done? Or would I have to create a whole new subscription to produce this effect? This should be a basic feature of any payment gateway so I am assuming that I am missing something.
It should also be noted that creating a new subscription may be problematic without an ability to cancel the previous subscription via the API. Provided that both the old and new cards are still valid, it would attempt to process the payments for both subscriptions!
On a side note, why does it seem that the Google Wallet API is missing so many key features? (annual subscriptions, subscription cancellation, the issue mentioned above, etc...?)
Thanks again everyone!
If Google can't successfully charge, they'll send you a failure postback which you can use to evaluate what to do with the subscription.
It would be best if you don't equate Wallet to a "payment gateway" (or credit card processing service/gateway) because it isn't.
At the end of the day, Wallet basically gives you some "access" to a Wallet User's data. It's up to the Wallet users' to add/remove whatever payment instruments they have in their Google Wallet.
in Wallet for Digital, Google also handles the transaction - the processing part, so you're freed of any PCI compliance, and related payment infrastructure to get stuff going.
Instant Buy, Google will send you a "virtual card" for you to process the transaction using your own/existing credit card processor/gateway. In this case, you do have to be PCI compliant and have existing infrastructure.
In both cases, you don't have access to the actual Wallet users' payment data. Google locks that stuff down.
Hth....

Amazon or priceline credit card payment system implementation

This is the scenario I expect the system behave:
I have a platform where users can register and store their credit card information online, and with specific user's action, system automatically settles payment.
Of course, user expect automatic payment system as we said so when they enter their card information, and the purpose of this is to simplify the process when they decided to pay for something.
My question is this:
I found that Amazon saves user's card information when they purchased some products then user doesn't need to put all the card information again but just select from the list of cards he used and with one click, it finishes payment.
Also, in price line, I found that it automatically settles after bid accepted.
So I tried to find the provider or payment gateway company that Priceline or Amazon provide, and tried to find the way to implement the system at least, but couldn't find any. What I have found so far were like, using paypal, and it requires user to have paypal id
I'm doing this in PHP, can anybody give me some clue please?
Thanks in advance.
You should be able to do this with most payment gateways that support recurring payments.
Typically what you would do for new customers is capture their card details 'as normal' (via the payment gateway). The payment gateway will return a token id which you then store against the customer record
Next time that customer makes a payment you can submit the tokenised card number to the payment gateway
Since you mentioned Amazon, you might want to look at their payment service API: http://aws.amazon.com/fps/

Resources