paymill vs stripe

63
Paymill or Stripe? Betabeers Madrid 44 Ivan Maeder Coderswitch @ivanmaeder

Upload: betabeers

Post on 19-May-2015

755 views

Category:

Education


1 download

DESCRIPTION

Charla sobre Paymill vs Stripe por Ivan Maeder en Betabeers Madrid Junio 2014.

TRANSCRIPT

Page 1: Paymill vs Stripe

Paymill or Stripe?Betabeers Madrid 44

Ivan MaederCoderswitch@ivanmaeder

Page 2: Paymill vs Stripe

My experience

Page 3: Paymill vs Stripe

1 price point (non-recurring)

June 2013

Multiple price points (recurring and non-recurring)

March 2014

$199 $199$99/month$49

/month

Page 4: Paymill vs Stripe

What are Paymill and Stripe?

Page 5: Paymill vs Stripe
Page 6: Paymill vs Stripe
Page 7: Paymill vs Stripe

if (paymill == stripe) printf("They work the same way");else printf("They work the same way");

Page 8: Paymill vs Stripe

Then why did you change?

Page 9: Paymill vs Stripe
Page 10: Paymill vs Stripe

Lots of little things that add up

Page 11: Paymill vs Stripe

Not all cards available to usCards supported > cards supported in our account

Test OK, live FAILOut of date documentation? No help for four days

Error in APIError case, probably ignored by most people

Unable to debug errorCalled the bank directly

Difficult to test transactions liveBlacklisted cards

Name shown on card statementsMartin Cabrera → Marsin Gabrera Diatb → Codekai

PCI documentationEndlosschleife

Page 12: Paymill vs Stripe

Shut up and code

Page 13: Paymill vs Stripe

1. Register online2. Download API (back-end)3. Get token via JavaScript (Ajax)4. Take payment (back-end)

Page 14: Paymill vs Stripe

1. Register online2. Download API (back-end)3. Get token via JavaScript (Ajax)4. Take payment (back-end)

Page 15: Paymill vs Stripe

Paymill StripeC# ✔ Community

Go ✘ Community

Java ✔ ✔

Node.js ✔ ✔

Perl ✘ Community

PHP ✔ ✔

Python ✔ ✔

Ruby ✔ ✔

Page 16: Paymill vs Stripe

Paymill StripeAndroid ✔ ✔

iOS ✔ ✔

Page 17: Paymill vs Stripe

1. Register online2. Download API (back-end)3. Get token via JavaScript (Ajax)4. Take payment (back-end)

Page 18: Paymill vs Stripe

Paymill

Page 19: Paymill vs Stripe

<form> <input name="card-number"> <input name="card-expiry"> <input name="card-security-code"></form>

Page 20: Paymill vs Stripe

<form> <input name="card-number"> <input name="card-expiry"> <input name="card-security-code"></form>

Page 21: Paymill vs Stripe

<form> <input class="card-number"> <input class="card-expiry"> <input class="card-security-code"></form>

Page 22: Paymill vs Stripe

<form> <input type="hidden" name="token"> <input class="card-number"> <input class="card-expiry"> <input class="card-security-code"></form>

Page 23: Paymill vs Stripe

<script> var PAYMILL_PUBLIC_KEY = "<$= publicKey() ?>";</script>

<script src="https://bridge.paymill.com/"></script>

Page 24: Paymill vs Stripe

$('form').submit(function() { ...

if (paymill.validateCardNumber(cardNumber)) { ...

paymill.createToken({ "number": cardNumber, ... "amount_int": 19900, "currency": EUR }, paymillResponseHandler);

return false;});

Page 25: Paymill vs Stripe
Page 26: Paymill vs Stripe

function paymillResponseHandler(error, result) { if (error) { ... } else { $('input[name="token"]').val(result.token); }

$('form').submit();}

Page 27: Paymill vs Stripe

That was Paymill

Page 28: Paymill vs Stripe

That was PaymillThis is Sparta Stripe

Page 29: Paymill vs Stripe

<script src="https://js.stripe.com/v2/"></script>

<script> Stripe.setPublishableKey("<$= publicKey() ?>");</script>

Page 30: Paymill vs Stripe

<form> <input type="hidden" name="token"> <input class="card-number"> <input class="card-expiry"> <input class="card-security-code"></form>

Page 31: Paymill vs Stripe

<form> <input type="hidden" name="token"> <input data-stripe="number"> <input data-stripe="exp-month"> <input data-stripe="exp-year"> <input data-stripe="cvc"></form>

Page 32: Paymill vs Stripe

$('form').submit(function() { ...

if (Stripe.card.validateCardNumber(cardNumber)) { ...

Stripe.card.createToken($('form'), stripeResponseHandler);

return false;});

Page 33: Paymill vs Stripe
Page 34: Paymill vs Stripe

function stripeResponseHandler(statusCode, response) { if (statusCode != 200) { ... } else { $('input[name="token"]').val(response.id); }

$('form').submit();}

Page 35: Paymill vs Stripe

1. Register online2. Download API (back-end)3. Get token via JavaScript (Ajax)4. Take payment (back-end)

Page 36: Paymill vs Stripe

Paymill (PHP)

Page 37: Paymill vs Stripe

$obj = new Services_Paymill_Transactions(privateKey(), "https://api.paymill.com/v2/");

$transaction = $obj->create(array("amount" => 19900, "currency" => 'EUR', "token" => $token));

if ($transaction["response_code"] != 20000) { ...}

Page 38: Paymill vs Stripe

Stripe (PHP)

Page 39: Paymill vs Stripe

Stripe::setApiKey(secretKey());

try { $charge = Stripe_Charge::create(array( "amount" => 19900, "currency" => "eur", "card" => $token ));} catch (Stripe_CardError $e) { ...}

Page 40: Paymill vs Stripe

1. Register online2. Download API (back-end)3. Get token via JavaScript (Ajax)4. Take payment (back-end)

Page 41: Paymill vs Stripe

$

$

Page 42: Paymill vs Stripe

Testing

Page 43: Paymill vs Stripe

Recurring payments

Page 44: Paymill vs Stripe

$customer = Stripe_Customer::create(array( "card" => $token));

$customer->subscriptions->create(array( "plan" => "MY_PLAN_1"));

Page 45: Paymill vs Stripe

Changing subscriptions

Page 46: Paymill vs Stripe

$customer = \Stripe_Customer::retrieve($stripe_customer_id);

$subscription = $customer->subscriptions->retrieve($stripe_subscription_id);$subscription->plan = "MY_PLAN_2";$subscription->save();

$invoice = \Stripe_Invoice::create(array( "customer" => $stripe_customer_id));

$invoice->pay();

Page 47: Paymill vs Stripe

-$0 -$200-$50-$100

1 2 3 4 5 6 7

8 9 10 11 12 13 14

15 16 17 18 19 20 21

22 23 24 25 26 27 28

29 30

1 2 3 4 5

6 7 8 9 10 11 12

13 14 15 16 17 18 19

20 21 22 23 24 25 26

27 28 29 30 31

-$100

$200$100/month /month $200

/month

Page 48: Paymill vs Stripe

$customer = \Stripe_Customer::retrieve($stripe_customer_id);

$subscription = $customer->subscriptions->retrieve($stripe_subscription_id);$subscription->plan = "MY_PLAN_2";$subscription->save();

$invoice = \Stripe_Invoice::create(array( "customer" => $stripe_customer_id));

$invoice->pay();

Page 49: Paymill vs Stripe

$200$100

-$200

1 2 3 4 5 6 7

8 9 10 11 12 13 14

15 16 17 18 19 20 21

22 23 24 25 26 27 28

29 30

/month /month

1 2 3 4 5

6 7 8 9 10 11 12

13 14 15 16 17 18 19

20 21 22 23 24 25 26

27 28 29 30 31

-$100 -$50-$100

$200/month

Page 50: Paymill vs Stripe

Costs

Page 51: Paymill vs Stripe

0.28€ + 2.95%per transaction

+2% for currency exchange

$0.30 + 2.9%per transaction

No additional exchange rate costs for European

currencies

Page 52: Paymill vs Stripe

Paymill Stripe

10€ 0.575€ 0.510€

100€ 3.230€ 3.120€

200€ 6.180€ 6.020€

500€ 15.030€ 14.720€

Page 53: Paymill vs Stripe

Refunds cost zero

Page 54: Paymill vs Stripe

Accepted cards

Page 55: Paymill vs Stripe

Paymill StripeVisa ✔ ✔

MasterCard ✔ ✔

American Express ✔ ✔

Diners Club ✔ ✘

Discovery ✔ ✘

China Union Pay ✔ ✘

JCB ✔ ✘

Page 56: Paymill vs Stripe

Paymill StripeVisa Electron ✔ ✘

Visa Debit ✔ ✘

Maestro ✔ ✘

MasterCard Debit ✔ ✘

Page 57: Paymill vs Stripe

And the winner is…

Page 58: Paymill vs Stripe

Paymill Stripe

Features ✔✔ ✔✔

Cards available ✔✔ ✔✔

Price ✔✔ ✔✔

Customer focus ✔✘ ✔✔

Programmability ✔✔ ✔✔

Page 59: Paymill vs Stripe

Keep in mind

Page 60: Paymill vs Stripe

30% more test casesValidations, error-handling

Data modelMinimum: customers, products, orders

DesignPayment form, A/B test conversion, email design and copy, convey confidence

Terms of useMoney back guarantee, trial periods or free plans, how to handle returns

PricingGood references: “Don’t Just Roll the Dice” and “Camels and Rubber Duckies”

Administration screensFor customers to view payments and download invoices, change cards

Other stuffTaxes, phone support

Page 61: Paymill vs Stripe

Questions?

Page 62: Paymill vs Stripe

Thank you!

Page 63: Paymill vs Stripe

Ivan MaederCoderswitch@ivanmaeder