Stripe Gateway Payments | Some important points

| By Webner

Important points about Stripe Gateway payments In Test Mode:

Below are some very useful points that you must know if are going to use Stripe as your payment gateway:

1. There is no limit on the payments for a stripe customer you are using in test mode. You can do as many payments as you want.

2. Token provided by stripe.js is for one-time use only. You can do only one payment with that token. To make a new payment you need to add new token if you are not saving customer card details in the stripe.

3. Stripe does not accept payment amount in decimal points. It should be Integer only.

4. The currency unit used by stripe for its payments is Cents. So if you have any other currency like Dollar, Pound etc. then first convert them into Cents. Otherwise, you will see inappropriate amount deducted for your payments in stripe.

5. The minimum amount for a payment is 50 Cents. Below this amount you will get payment error from stripes.

6. While fetching payment card details from stripe using the card token, it will only return last four digits in the response. So you can’t get first six digits of your card if your want.

7. If you want to create a customer once and then want to reuse it for rest of the payments, you can do it by customer reference returned by stripes when a new customer is added to stripe. Use following lines of code if you want to attach your one time card token to the existing customer:

Stripe.apiKey= key;    // add the stripe key here
//get existing customer from stripe
Customer cu = Customer.retrieve(customertoken);// you have to store it 
somewhere in you database for further reference.
Map<String, Object> updateParams = new HashMap<String, Object>();
//attach one time card token to the customer	
try {
} catch (Exception e) {
// TODO Auto-generated catch block

This code will attach “one-time use” card token to your existing customer.

8. If you want to test card declines in test mode you can use the link below for different error types:

Remember in test mode we can’t see the declines by bank because in test mode there is no interconnection of the application with bank.

Leave a Reply

Your email address will not be published. Required fields are marked *