payments made easy with stripe

81
Payments Made Easy with Stripe ConFoo Vancouver 2016 Blog - shawnhooper.ca Twitter - @shawnhooper

Upload: shawn-hooper

Post on 11-Apr-2017

320 views

Category:

Internet


3 download

TRANSCRIPT

Page 1: Payments Made Easy with Stripe

Payments Made Easy with

Stripe

ConFoo Vancouver 2016

Blog - shawnhooper.ca Twitter - @shawnhooper

Page 2: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Director of IT at Actionable.co

Web Developer for the past 20 years

Happy to be visiting here from Ottawa

Hi, I’m Shawn

Page 3: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

A set of unified APIs and tools that instantly enables businesses to accept and

manage online payments.

Built for developers!

What is Stripe?

Page 4: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

2.9% + $0.30 per transaction

Discounted rates apply once you exceed $10,000 in transactions per month.

What does Stripe cost?

Page 5: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

No setup fees

No monthly fees

Free refunds

Free failed transactions

What does Stripe cost?

Page 6: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

$15 fee on chargebacks

* refunded if the dispute is resolved in your favour

What does Stripe cost?

Page 7: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

2% Currency Exchange Fee

What does Stripe cost?

Page 8: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

0.5% on funds paid out through Managed Accounts

What does Stripe cost?

Page 9: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Visa

MasterCard

American Express

Apple Pay

Bitcoin, Alipay, ACH (US Only)

Payment Methods Accepted

Page 10: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

If you have a US Dollar Bank Account:

Bitcoin ACH (Direct to Bank Account)

AliPay

Payment Methods Accepted

Page 11: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

If you have a US Stripe Account :

JCB Discover

Diner’s Club

Payment Methods Accepted

Page 12: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Accepted CurrenciesAED: United Arab Emirates Dirham

ALL: Albanian Lek ANG: Netherlands Antillean Gulden

ARS: Argentine Peso* AUD: Australian Dollar AWG: Aruban Florin

BBD: Barbadian Dollar BDT: Bangladeshi Taka BIF: Burundian Franc

BMD: Bermudian Dollar BND: Brunei Dollar

BOB: Bolivian Boliviano* BRL: Brazilian Real*

BSD: Bahamian Dollar BWP: Botswana Pula BZD: Belize Dollar

CAD: Canadian Dollar CHF: Swiss Franc

CLP: Chilean Peso* CNY: Chinese Renminbi Yuan

COP: Colombian Peso* CRC: Costa Rican Colón*

CVE: Cape Verdean Escudo* CZK: Czech Koruna*

DJF: Djiboutian Franc* DKK: Danish Krone

DOP: Dominican Peso DZD: Algerian Dinar EGP: Egyptian Pound ETB: Ethiopian Birr

EUR: Euro FJD: Fijian Dollar

FKP: Falkland Islands Pound* GBP: British Pound

GIP: Gibraltar Pound GMD: Gambian Dalasi GNF: Guinean Franc*

GTQ: Guatemalan Quetzal* GYD: Guyanese Dollar

HKD: Hong Kong Dollar

HNL: Honduran Lempira* HRK: Croatian Kuna HTG: Haitian Gourde

HUF: Hungarian Forint* IDR: Indonesian Rupiah ILS: Israeli New Sheqel

INR: Indian Rupee* ISK: Icelandic Króna JMD: Jamaican Dollar

JPY: Japanese Yen KES: Kenyan Shilling

KHR: Cambodian Riel KMF: Comorian Franc

KRW: South Korean Won KYD: Cayman Islands Dollar

KZT: Kazakhstani Tenge LAK: Lao Kip*

LBP: Lebanese Pound LKR: Sri Lankan Rupee LRD: Liberian Dollar

MAD: Moroccan Dirham

Page 13: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Accepted Currencies

MDL: Moldovan Leu MNT: Mongolian Tögrög MOP: Macanese Pataca

MRO: Mauritanian Ouguiya MUR: Mauritian Rupee* MVR: Maldivian Rufiyaa

MWK: Malawian Kwacha MXN: Mexican Peso*

MYR: Malaysian Ringgit NAD: Namibian Dollar NGN: Nigerian Naira

NIO: Nicaraguan Córdoba* NOK: Norwegian Krone NPR: Nepalese Rupee

NZD: New Zealand Dollar PAB: Panamanian Balboa* PEN: Peruvian Nuevo Sol*

PGK: Papua New Guinean Kina PHP: Philippine Peso

PKR: Pakistani Rupee PLN: Polish Złoty

PYG: Paraguayan Guaraní* QAR: Qatari Riyal

RUB: Russian Ruble SAR: Saudi Riyal

SBD: Solomon Islands Dollar SCR: Seychellois Rupee

SEK: Swedish Krona SGD: Singapore Dollar

SHP: Saint Helenian Pound* SLL: Sierra Leonean Leone

SOS: Somali Shilling STD: São Tomé and Príncipe Dobra

SVC: Salvadoran Colón* SZL: Swazi Lilangeni

THB: Thai Baht TOP: Tongan Pa‘anga

TTD: Trinidad and Tobago Dollar TWD: New Taiwan Dollar

TZS: Tanzanian Shilling UAH: Ukrainian HryvniaUGX: Ugandan Shilling

USD: United States Dollar UYU: Uruguayan Peso* UZS: Uzbekistani Som

VND: Vietnamese Đồng VUV: Vanuatu Vatu WST: Samoan Tala

XAF: Central African Cfa Franc XOF: West African Cfa Franc*

XPF: Cfp Franc* YER: Yemeni Rial

ZAR: South African Rad

Page 14: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Unfortunately, in Canada, you can only charge in:

Canadian Dollar (CAD) United States Dollar (USD)

Accepted Currencies

Page 15: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Transfers from your Stripe account to your bank account happen automatically.

In Canada, transfers happen on a rolling 7 day period.

Transfer Periods

Page 16: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

How Do You Use Stripe?

Page 17: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

You need a publishable and a secret key

pk_test_TWiIAK1daBceEh3lfCDzjavf sk_test_nigZcikILd8oLeaJk4hvuYtN

You get these in your dashboard under Account Settings, API Keys

API Keys

Page 18: Payments Made Easy with Stripe
Page 19: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

If you’re in production, your site needs to running HTTPS.

You can use HTTP for testing.

HTTPS

Page 20: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

https://stripe.com/docs/testing

Test Credit Card Numbers

Page 21: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

https://stripe.com/docs/testing

Test Credit Card Numbers

Page 22: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

There are official libraries available for Python, Ruby, PHP, Java, Node.js, Go,

iOS and Android + many other community libraries

https://stripe.com/docs/libraries

Download a Stripe Library

Page 23: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Stripe Checkout

Page 24: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

This is the simplest way of charging credit cards.

Stripe Checkout

Page 25: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Create your checkout button:

Page 26: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Stripe Checkout

Page 27: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

stripeToken

A hidden field that contains a token representing the credit card entered.

Stripe Checkout

Page 28: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Stripe Checkout

Page 29: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Congratulations! You’ve successfully charged

your customer!

Page 30: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Add Metadata

Page 31: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Store Cards for Future Use

Page 32: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Stripe.JS

Page 33: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Instead of using the modal credit card form from Stripe,

you can build your own.

Stripe.JS

Page 34: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Stripe.JS

Page 35: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Page 36: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Page 37: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Stripe.JS

Page 38: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Just like when using Stripe Checkout

the next step is to charge the card, or store it for future use as a Customer object.

Stripe.JS

Page 39: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Subscriptions

Page 40: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Create a Plan

Page 41: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Subscribe Customer to a plan

Page 42: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Subscriptions

Other features of the subscription system:

Changing (upgrading/downgrading) subscriptions Trial Periods

Coupons & Discounts Metered Billing (one time charges)

Per User Pricing

Page 43: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Stripe Connect

Page 44: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Stripe Connect

Allows you to create a marketplace or platform that interacts with other Stripe accounts.

Page 45: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Stripe Connect

Standalone Accounts:

Easier to setup (as a platform)

Puts more responsibility on the account holder

Page 46: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Stripe Connect

Managed Accounts:

Invisible to the connected account holder More responsibility lies with the platform

Incurs the 0.5% fee on payout

Page 47: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Stripe Connect

As the “Marketplace” you would send your user to a URL like this to setup their account and authorize you to charge

on their behalf:

https://connect.stripe.com/oauth/authorize?response_type=code&client_id=ca_5dYwdVHsycnuKKz6OM

2bBh6N2u3lCkll&scope=read_write&state=234983275

Page 48: Payments Made Easy with Stripe
Page 49: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Stripe Connect

Success:

https://example.com/return-url/?section=stripeconnect&stripeconnectresponse=true?scope=read_write&code=AUTHORIZATION_CODE

&state=STATE_VALUE

Failure: https://example.com/return-url/?

section=stripeconnect&stripeconnectresponse=true?error=access_denied&error_description=The%20user%20denied%20y

our%20request

Page 50: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Stripe Connect

Page 51: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Stripe Connect

Page 52: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Charge from Connected Account

Page 53: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Application Fees

Page 54: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Charge Through the Platform

Page 55: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Sharing Customers

Page 56: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Sharing Customers

Page 57: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Refunds

Page 58: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Refunds

Page 59: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Webhooks

Page 60: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Webhooks

Allow Stripe to notify your application when anything

happens in your Stripe account.

Page 61: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Webhooks

Everything you do in Stripe is synchronous,

but you may need to know things that happen when your app isn’t expecting it.

Page 62: Payments Made Easy with Stripe
Page 63: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Webhooks

Webhook requests must always return HTTP 2xx

Page 64: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Webhooks

Webhooks can be sent more than once.

Make your processing idempotent

Page 65: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Relay

Page 66: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Relay

Let’s you sell products directly on Twitter and Spring using the Stripe API

Page 67: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Relay

New API Objects:

Product SKU

Order

Page 68: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Relay

Page 69: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Relay

Page 70: Payments Made Easy with Stripe
Page 72: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Relay

Page 73: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Relay

Implement Webhooks

Mark Orders as Fulfilled

Profit!

Page 74: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Radar

Page 75: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Radar

Machine Learning assisted fraud detection.

Custom Rules

Review Flagged Payments

Page 76: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

API Documentation

Page 77: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

https://stripe.com/docs/api/

Page 78: Payments Made Easy with Stripe
Page 79: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Data Portability

Page 80: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Data Portability

If you want to leave Stripe, they’ll help you with that too.

They’ll facilitate transferring credit card data to your next provider in a PCI-compliant way.

For free.

Page 81: Payments Made Easy with Stripe

Blog - shawnhooper.ca Twitter - @shawnhooper

Thank You!

These slides will be available at

shawnhooper.ca

E-Mail: [email protected]

Tweet me @shawnhooper