How can I supply user with download details after payment? - stripe-payments

I would like to use Stripe to sell digital goods. User needs a licence code after completing payment. The Strip API allows adding a description to the PaymentIntent that is apparently shown to the user on the Receipt.
Are there better ways for managing supply of download details/ license keys through the Stripe API?

Related

Setting up recurring payments with Apple Pay and Stripe - but not using Stripe subscriptions

We have our own payment processing system. This takes a customer token from Stripe's response after initially checking out, and uses it each month to charge the customers card.
We want to do similar for mobile wallets, like Apple Pay.
However, Stripe docs indicate that it only returns a token which is 'single use', so the customer would have to authenticate the payment each month:
We aren't able to integrate with Stripe's 'subscriptions' service, as we'd have to migrate across entirely to Stripe - which we can't do.
So as a result, is it possible to get a reusable token - or does the 'subscription' it's referring to mean that we can get a reusable token in the same way as a standard card payment?
And by reusable token - I mean, the customer doesn't need to authenticate the payment each month.
Hope that makes sense!
When you accept an Apple Pay payment, you can still save the underlying card for future payments. This will then work whether you use Billing (their recurring payments product) or just create one-time payments yourself.
The call out from Stripe in their docs is more around the rules coming from Apple. If your customer is checking out in your application or website, you are expected to show them the Apple Pay UI to confirm the payment again instead of using a previously saved card. On the other hand, if you are doing recurring payments, you can use the previously saved card for future payments.
The integration itself is fairly straightforward. You would create a PaymentIntent server-side and collect the card details client-side whether via Apple Pay or not. Since you want to save card details for future payments you would also pass setup_future_usage: 'off_session' on the PaymentIntent creation. After a successful payment, a PaymentMethod of type card would be attached to the customer with the id pm_123 and you could use this in future recurring payments.
This flow is covered in Stripe docs here and also applies to Apple Pay and this section covers how to make the future payments.

Using saved card details for MOTO payments

Does anyone know if you're allowed to use saved card details for MOTO payments?
The scenario is this.
Customer calls in.
Agent brings up customer details
Agent see that the customer has saved cards already on their account
Agent selects saved card
Agent uses that to start the payment (I believe CCV details will need to be
added to complete payment)
It was my understanding that all card details need to be keyed in (card number/date/CCV).
In my case, we're using Stripe API, but I'm more concerned about the rules of the process in general.
If you want to process MOTO payments with the Stripe API, you first need to contact Stripe to enable that feature as explained here. Otherwise, if your account is in the European Economic Area, payments made by manually entering card details in the Dashboard will be automatically marked as MOTO by Stripe.
However, as mentioned on this support page, note that:
You’re responsible for ensuring that you protect your customers’ card information in accordance with PCI compliance requirements.
Manually creating payments through the Dashboard must only be performed when there are exceptional circumstances preventing you from using your own integration. It cannot be your primary method of processing payments on your account.

Implementing SCA into Stripe implementation

I've making a SaaS that allows customers to subscribe to a plan, and use coupons at the checkout stage. The coupons give the customers X% off for X months, and by default, everyone gets a 7 day trial when they subscribe.
What is confusing me is the documentation. In one section it says that you should create SetupIntents to take a payment and elsewhere it says to use tokens.
I'm in the middle of coding the payment flow, but I just wanted to check to see if my logic and understanding is correct. Could anyone validate the below?
Customer enters card number and coupon
Call Stripe, get token for card
Send token and coupon to server
Create Stripe customer with token
Create Subscription with discount and pass customer ID
What has now happened is an authorisation attempt was made. If SCA is required, then the subscription status is incomplete and the latest invoice payment intent status requires action.
At this point, I can redirect my user to the SCA Flow using handleCardPayment() to prompt 3DS, and once complete the subscription status is then active.
If the invoice payment fails for any reason, then the subscription state is incomplete and the payment intent requires has a payment action required status. At this point, I should present my customer with the React Elements form again, and call the stripe.invoices.pay endpoint with the new card token
Going forwards, all subscription charges should not need further SCA approval, however if the customer changes plan or the bank requests it, then I can point my user back through the SCA Flow process
A diagram of the flow is here: Green is UI, Orange is Server, Blue is Stripe
Is there anything I have missed or misunderstood here? I've been reading about creating SetupIntents and PaymentIntents, but I'm not sure I need this?
If you are creating subscriptions using the Stripe Billing product they handle creating the PaymentIntent(if you are taking a payment immediately) or a SetupIntent (if you are setting up a trial or metered billing). All that you really have to do different is handleCardPayment (for payments) or handleCardSetup (for setting up trials and metered billing). This section in the docs is pretty good.
If you are not using billing they have a video on their Stripe Developers Youtube channel which may help clear up any confusion.
Hope this helps :)
Welcome fellow sufferer, cards and tokens are implemented in Stripe Charges API which is not SCA compilant. If you want use Stripe for payments inside the EU you should use payment intents.
Card tokens are also allowed for creating payment intents.
But if you want reduce the number of necessary authentications you should use setup intents (with usage = "off-session") for creating payment methods and not card tokens.
I have a lot of old customers who have still registered with the Charges API. I use the following strategy:
New customers always register via Setup Intents and Payment Methods.
Old customers use the Charges API until their tokens become invalid. Then they must also use setup intents and payment methods.
Of course, the customers do not notice much of it.
In summary, I would always use payment methods and setup intents for new customers and card updates. Only with the setup intents can you ensure that your customers have to authenticate themselves as rarely as possible.
EDIT: The crucial point is off-session payments that occur with subscriptions. The Stripe procedure is described here: https://stripe.com/docs/payments/cards/saving-cards#saving-card-without-payment

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/

Online Reservation and Payment System

we created an online reservation and payment system, we are going to use paypal to pay for the reservation fee.
how do we exactly save the information of our customer and reservation info to our database, after confirming their payment.
how do we confirm that they also paid it?
thanks in advance. as of now we're using the 'pay now' button
You should save the info to the database FIRST, then they can go to the PayPal site. After that, you can use Instant Payment Notification to mark the order as complete.
https://www.paypal.com/ipn
Paypal provide different methods to make payment; you can redirect user to PayPal from your application without taking customer information (e.g. name, phone, email). PayPal API is rich with multiple set of methods like SetExpressCheckOut, GetExpressCheckOut, DoExpressChckOut.
First please make a contract with PayPal and get the Merchant information; later you can have detailed documented API to talk to them.
Thank you

Resources