I Tried the Online Payment, Stripe
Autumn in 2016, Stripe, the giant of online payment is landing Japan! I wrote an experience note, anyway.

0. Stripe is landing!

Media says Stripe has made its full-scale entry into the Japanese market last Tuesday (2016-10-04).

Stripe is an American IT company, operating in over 25 countries, that allows both private individuals and businesses to accept payments over the Internet. (Wikipedia)

Even though most articles focused on “…merchants and other businesses in Japan can use Stripe to sell goods in around 130 different currencies”, I thought its “Connect feature”, which allows us to automate “intermediary exploitation” (?), or its “Protection racket fee” (??), is ‘Super cool!’.

For instance, the desk work in a sales agency could become unmanned.

 

TOC
1. Let’s Try it now
2. Impressions of the reference
3. Basic structure of Stripe
4. Characteristics of Stripe
5. To call from Workflow
6. Concrete API calls
7. Conclusion

 

1. Let’s Try it now

Practice makes perfect…

Although the contents in the Website of Strip Japan and in the blog concerning the release of their official versionare translated into beautiful Japanese language, the contents in their Stripe APIs reference are…completely in English.

Well, this industry is always like that, even if they announce the “Landing in Japan!”

(Nobody expects…)

 

2. Impressions of the reference

It’s good.

I could skim it without getting lost, compared to Google’s reference in which I get lost in the links every time I visit it. To understand the functions overview, I would say it takes 30 minutes for the tutorials and one hour for the API references (as long as you are familiar with APIs).

Although, on the reference page, they tell you to “throw this CURL command in your own terminal!” when you haven’t even logged in. I don’t know how to say it, but I thought it’s very “pushy” or “masculine”…

Regarding to the sample codes, they insist “This is the simplest way!”…

It’s “manly” or “brisk” or…

However, I think it would be good for me to learn their ways.

Although this is my very personal and irresponsible opinion, I think people who are “admire burly young Stripe, rather than PayPal –which is getting old.” will come up.

# By the way, if there is anything you absolutely do not understand, I recommend you to make a functional comparison (or pre-learning) with “WebPay”, which is popular within Japan (which I also recommend), on their Website

 

3. Basic structure of Stripe

To roughly summarize it, it manages:

  • A, Customer information / Credit card information in [Customers]
  • B, Billing information in [charge]

(That’s simple.)

Putting it simply, it registers A, and sends billing information of B1 B2 B3 B4 B5 B6 B7 B8 B9 to A.

 

4. Characteristics of Stripe

Even though I have experienced various APIs, such as Google APIs, mainly, kintone APIs, or “Corporate Number System Web-APIs”, etc. I think “Stripe APIs” are distinctive somehow…

Notably, the “Test Mode” is very easy to use.

Honestly, I thought Questetra (Cloud-based Workflow) should emulate its interface (or rather its design concept).

In fact, for implementers who are still anxious even after conducting tests to try the “utilization of APIs”. I suppose this system design, which handles in parallel “Test Mode and Live Mode” be contributing to push up the speed and the quality of the implementation to a higher level.

# More specifically, it distinctively uses the four keys (Basic authentication) and bravely disregards the “Grant Flow for OAuth”.

 

5. To call from Workflow

Well, naturally, in my role,

I tried accessing Stripe APIs from an auto-step in Questetra BPM Suite, a Cloud-based Workflow.

* The gray rectangles are auto-steps, and the blue rectangles are human steps.

The point is to delegate all the “information of Credit cards or email addresses” to Stripe, and Questetra storages only “A. Customer information”. (Steps in the first half)

* The actual data is like “cus_9K3Z1YSdyG6mvV”.

And after that, it will send “B. Billing information” to Stripe each time charge occurs. (Loop in the last half)

* As a matter of fact, the method of directly delivering information to Stripe from a browser using “Stripe.js”, and delivering only “cus_foobar” to the server, is the “Royal road”. (Even though there is a Cross site issue…)

Additional Notes (2017-09):
For information on how to make browser communication with Stripe Elements, please see the following.

Incidentally, the Workflow diagram above seems quite a plain sample. However, it will become a full-fledged business Process by adding, for example, human steps such as “Confirmation of Completion schedule” or “Shipping of goods”, or auto-steps such as “Sending Thank-you mail” or “Sending invoice PDF”, etc. (This is a so-called “Modeling of a Business Process”.)

By the way, even though the ‘Credit card number should not be stored’ it is a quite important knack for the Credit card settlement business, you should record at least the last four digits of the number. (In cases where you could be requested “the card you charged to”) So in this example, I recommend you to make it overwrite the ‘Credit card number’ with the ‘last 4 digits of the card number’.

 

6. Concrete API calls

Here, I have packaged this automatic processing step.

This package will allow people who are not capable of writing Script to POST to Stripe APIs.

* I have sneakily placed the packaged Feature expansion file on M415AUTOMATED STEPAdding an Auto-Step to be Used for Business Process Definition.

The following are brief explanations of the contents of the Add-on for people who want to create their own package.

At the first Step, information of [A, Customers], that is “information of a customer and Credit card” is sent in 8 parameters.

var responseJson = "";
var uri = "https://api.stripe.com/v1/customers";
var response = httpClient.begin()
  .basic( secretKey, "" )
  .formParam( "description", stripeDesc )
  .formParam( "email", stripeEmail )
  .formParam( "source[object]", "card" )
  .formParam( "source[exp_month]", expMonth )
  .formParam( "source[exp_year]", expYear )
  .formParam( "source[number]", stripeCardNum )
  .formParam( "source[cvc]", stripeCardCvc )
  .formParam( "source[name]", stripeCardName )
  .post( uri );
var httpStatus = response.getStatusCode() + "";

It POSTs ‘Name of the contract’ in “description”, ‘Credit card number’ in “source[number]”, and so on… Soon a reply “O.K. Memorized!” will be returned, then it will store the necessary information among that Response (JSON) into the Workflow side. (Customer ID and Last four digits)

At the second Step, information of the [B, Charge], that is the “Billing information” is sent in 4 parameters.

var responseJson = "";
var uri = "https://api.stripe.com/v1/charges";
var response = httpClient.begin()
  .basic( secretKey, "" )
  .formParam( "description", stripeDesc )
  .formParam( "customer", stripeCusId )
  .formParam( "amount", stripeAmount )
  .formParam( "currency", stripeCurrency )
  .post( uri );
var httpStatus = response.getStatusCode() + "";

It POSTs ‘Contents of providing service’ in “description”, amount of the fee in “amount”, and so on… Soon a reply “O.K. it’s charged!” will be returned, then it will store the necessary information among that Response (JSON) into the Workflow side. (Charge ID and Last four digits)

 

7. Conclusion

As for e-commerce systems of this kind, they used to build them on their own. (Until recently…)

There used to be projects to develop this kind of systems which cost $50K, $100K, $200K, all over the world. (Maybe still now?)

However, now we are able to build it easily, only with Stripe and Questetra. Something greater could be done if you connect to other Cloud services.

Thus, you are able to build up a system which would cost hundreds of thousands of dollars a few years ago, by yourself, in a few days, for Free!
(Of course, you must have a business idea, separately!)

I truly think it is becoming an awesome era…

Oh, one more important thing at the end…

Questetra, a Cloud-based Workflow, is FREE of charge!

You Cloud-lovers, try it now!

Questetra Free trial  

About The Author

댓글 남기기

이 사이트는 스팸을 줄이는 아키스밋을 사용합니다. 댓글이 어떻게 처리되는지 알아보십시오.

Scroll to Top
%d 블로거가 이것을 좋아합니다: