Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Perfect Payment Experience

The Perfect Payment Experience

Infrastructure and how Square makes commerce easy.

Avatar for Abhay Kumar

Abhay Kumar

May 29, 2013

Other Decks in Technology

Transcript

  1. ‣ Three countries: United States, Canada, Japan ‣ Millions of

    individuals and businesses ‣ Processing $15 billion annually, excluding Starbucks ‣ Card and Wallet transactions at 7,000 Starbucks stores Square Stats
  2. ‣ 180+ million Americans carry a payment card. ‣ 600+

    million cards in the United States. ‣ 75% of businesses only accept cash. Industry Stats
  3. ‣ Signup ‣ Activation ‣ Receiving a reader ‣ First

    swipe ‣ Subsequent swipes ‣ Settlement / Receiving funds ‣ Refunds ‣ Chargebacks Where do we sta ?
  4. ‣ Swipe card. ‣ Authorize transaction. ‣ Capture signature. ‣

    Repeat a few times. ‣ Get paid. Swipe to Settle
  5. ‣ Total request duration including background calls. ‣ Time transitions

    between screens. ‣ How long did the server take? ‣ Did the merchant swipe once? twice? ‣ Did the authorization fail? Did the merchant retry? ‣ Did the client crash? ‣ Link all the interactions to make it easier. ‣ Use an identifier that spans the ‘session’. ‣ Forward everything to the server in the background. Client-side metrics
  6. ‣ End-to-end ‣ User lookup ‣ Decryption / Tokenization ‣

    Datastore ‣ Gateway / Card network ‣ Risk decision engine Server-side metrics Online processing
  7. ‣ Time to cardholder statement ‣ Time to merchant payout

    ‣ Successful deposit into merchant accounts Server-side metrics Batch processing
  8. ‣ Provenance is impo ant ‣ Make it easy to

    access this information ‣ Anonymize/sanitize as necessary ‣ Make it available in all data-centers ‣ Store a ‘raw’ copy of everything Invest in data collection
  9. ‣ Samsa: set of applications used for high-throughput messaging. ‣

    Samsa producer clients: metrics, logging, rpc-ale ing, sawmill ‣ Kafka: message broker. messages are available for a configurable retention period ‣ Samsa consumer applications: graphite, splunk, distributed tracing, HDFS Tools we use Samsa + Kafka
  10. ‣ Storing everything has benefits ‣ MapReduce to provide intermediate

    a ifacts ‣ Generate your metrics in batch or near-realtime Tools that we use Hadoop
  11. ‣ We use it a lot. It’s not going to

    scale. ‣ Intermediate products and some source data ends up here. ‣ Sta sharding data. ‣ Consider alternatives for your analysts. Tools that we use MySQL
  12. ‣ Online card processing should be in multiple data centers.

    ‣ Pin transactions to your data centers. ‣ Degrade gracefully Availability
  13. ‣ Invest in multiple processing networks. ‣ Invest in redundant

    connectivity to them. ‣ Get closer to the metal. Networks