神刀安全网

Introducing Square’s Register API for Android

May 25, 2016

Following our launch ofRegister API for iOS in March, beginning today, developers can now build custom Android point-of-sale applications that take swipe, dip, or tap payments through Square hardware, and integrate with Square’s software and services. This builds on our existing API offerings for Square Register and eCommerce .

Register API for Android

The Square Register API lets you focus on what you do best: creating an amazing point-of-sale experience for your merchants while Square takes care of moving the money. You can build a custom point of sale with specific features for your business’ needs, or start a technology company for a new point of sale and sell it to businesses. Get startedtoday by creating your Android application!

Maybe you will build a custom point of sale for lawn care service companies, an in-store on-floor retail business checkout, an optimized cart and membership funnel for wineries, a self checkout for doggie daycares – your imagination is the limit! Your app doesn’t have to handle any payments information, which makes PCI compliance a non-event. And you won’t need to think for a second about integrating with hardware card readers. Build your custom app and distribute it like normal on the Play Store. When it is time for your app to initiate a payment, call our SDK with an amount to start theSquare Register app on the payment screen. The buyer completes the payment in Register (by swiping, tapping, dipping, or keying in the card) and then focus and control automatically returns back to your app with the result of the charge. Thanks to Square Register, all the money movement heavy lifting is taken care of. Android Register API supports all our hardware, including the new Square Contactless + Chip Reader .

To start taking payments, it’s as simple as three lines of code:

ChargeRequest chargeRequest = new ChargeRequest.Builder(1_00, USD).build(); Intent chargeIntent = registerClient.createChargeIntent(chargeRequest); startActivityForResult(chargeIntent, CHARGE_REQUEST_CODE); 

Square Register will come to the foreground and complete the payment on your behalf. Once that’s done, we’ll return the payment result to your app.

@Override protected void onActivityResult(int requestCode, int resultCode,      Intent data) {   if (requestCode == CHARGE_REQUEST_CODE) {     if (resultCode == Activity.RESULT_OK) {       ChargeRequest.Success success = registerClient.parseChargeSuccess(data);       onTransactionSuccess(success);     } else {       ChargeRequest.Error error = registerClient.parseChargeError(data);       onTransactionError(error);     }   } else {     super.onActivityResult(requestCode, resultCode, data);   } } 

Pricing is the same as other payments completed using Square Register. The Register API for Android is currently only available in the US and Canada, with other markets to quickly follow.


Introducing Square’s Register API for Android

We are busy building out Square’s commerce platform, to give merchants solutions to help them easily run their business. We’re eager to hear your feedback! You can reach us at developers@squareup.com and follow @SquareDev on Twitter for more updates about Square’s developer platform and community. Get startedtoday by creating your Android application!

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » Introducing Square’s Register API for Android

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址