views:

46

answers:

2

I'm working on an ruby on rails app that has a special billing method.

I'm creating a store where users can reserve products but will not get charged for these products until a certain amount has been reached. This amount cannot be quantified by time so I'm wondering if this is a recurring payment. However, accounts will have to provide a payment method in order to reserve these products and it is cumbersome to have them give their information every time. What's more is that I need their information so I know they want the product but I won't charge it right away.

What to do?

A: 

I recommend outsourcing this to a company that handles payments, I advise against PayPal because of charges. You will end up getting into a lot of trouble if you are writing everything from the ground up.

Beyond that I am assuming this is a real world scenario. In that case I wouldn't consider it a recurring payment, on account of it is a once and done payment. Forgot to add, store their information with a 3rd party vendor or get really good at knowing the rules of what you can and cannot store online.

Woot4Moo
The payment is once and done, but consider that the account will buy another product in the next month.I guess the real problem is that I need their credit card info to make sure they are serious and not charge until the order is full
Sam
well in that case you would just do a seemingly simple check against the reserve value. However, as I mentioned there are many pitfalls and legal ramifications to storing credit card information.
Woot4Moo
You right. I'm not going to store the credit card. I'm going to use ActiveMerchant and Authorize.net. There is just not too much out there on it
Sam
A: 

First you want to capture card details up front, but not make any charge.

That can be done with most payment service providers (PSPs). Usually you will redirect from your site to a site hosted by the PSP which captures the card details. Once the user leaves that page they will redirect back to your site, and you will receive a payment Token, which is essentially a GUID which can be used in future transactions instead of a card number.

Each time you want to take payment from that card you can submit your Token Id and payment value to the PSP for authorisation and settlement. Bear in mind that its entirely possible that the authorization could fail or be declined.

This is technically known as a recurring payment in that there are potential complications which your PSP should handle for you, such as credit cards expiring, or being replaced. Decent PSPs will make use of the Visa Account Updater service, or the equivalent Mastercard Automated Billing Updater to ensure that behind the scenes the card number is automatically updated. Worth checking that your chosen PSP provides this capability.

PaulG