Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Paymill vs Stripe

2,585 views

Published on

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

  • Be the first to comment

Paymill vs Stripe

  1. 1. Paymill or Stripe? Betabeers Madrid 44 Ivan Maeder Coderswitch @ivanmaeder
  2. 2. My experience
  3. 3. 1 price point (non- recurring) June 2013 Multiple price points (recurring and non- recurring) March 2014 $199 $199$99/month$49/month
  4. 4. What are Paymill and Stripe?
  5. 5. if (paymill == stripe) printf("They work the same way"); else printf("They work the same way");
  6. 6. Then why did you change?
  7. 7. Lots of little things that add up
  8. 8. Not all cards available to us Cards supported > cards supported in our account Test OK, live FAIL Out of date documentation? No help for four days Error in API Error case, probably ignored by most people Unable to debug error Called the bank directly Difficult to test transactions live Blacklisted cards Name shown on card statements Martin Cabrera → Marsin Gabrera Diatb → Codekai PCI documentation Endlosschleife
  9. 9. Shut up and code
  10. 10. 1. Register online 2. Download API (back-end) 3. Get token via JavaScript (Ajax) 4. Take payment (back-end)
  11. 11. 1. Register online 2. Download API (back-end) 3. Get token via JavaScript (Ajax) 4. Take payment (back-end)
  12. 12. Paymill Stripe C# ✔ Community Go ✘ Community Java ✔ ✔ Node.js ✔ ✔ Perl ✘ Community PHP ✔ ✔ Python ✔ ✔ Ruby ✔ ✔
  13. 13. Paymill Stripe Android ✔ ✔ iOS ✔ ✔
  14. 14. 1. Register online 2. Download API (back-end) 3. Get token via JavaScript (Ajax) 4. Take payment (back-end)
  15. 15. Paymill
  16. 16. <form> <input name="card-number"> <input name="card-expiry"> <input name="card-security-code"> </form>
  17. 17. <form> <input name="card-number"> <input name="card-expiry"> <input name="card-security-code"> </form>
  18. 18. <form> <input class="card-number"> <input class="card-expiry"> <input class="card-security-code"> </form>
  19. 19. <form> <input type="hidden" name="token"> <input class="card-number"> <input class="card-expiry"> <input class="card-security-code"> </form>
  20. 20. <script> var PAYMILL_PUBLIC_KEY = "<$= publicKey() ?>"; </script> <script src="https://bridge.paymill.com/"></script>
  21. 21. $('form').submit(function() { ... if (paymill.validateCardNumber(cardNumber)) { ... paymill.createToken({ "number": cardNumber, ... "amount_int": 19900, "currency": EUR }, paymillResponseHandler); return false; });
  22. 22. function paymillResponseHandler(error, result) { if (error) { ... } else { $('input[name="token"]').val(result.token); } $('form').submit(); }
  23. 23. That was Paymill
  24. 24. That was Paymill This is Sparta Stripe
  25. 25. <script src="https://js.stripe.com/v2/"></script> <script> Stripe.setPublishableKey("<$= publicKey() ?>"); </script>
  26. 26. <form> <input type="hidden" name="token"> <input class="card-number"> <input class="card-expiry"> <input class="card-security-code"> </form>
  27. 27. <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>
  28. 28. $('form').submit(function() { ... if (Stripe.card.validateCardNumber(cardNumber)) { ... Stripe.card.createToken($('form'), stripeResponseHandler); return false; });
  29. 29. function stripeResponseHandler(statusCode, response) { if (statusCode != 200) { ... } else { $('input[name="token"]').val(response.id); } $('form').submit(); }
  30. 30. 1. Register online 2. Download API (back-end) 3. Get token via JavaScript (Ajax) 4. Take payment (back-end)
  31. 31. Paymill (PHP)
  32. 32. $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) { ... }
  33. 33. Stripe (PHP)
  34. 34. Stripe::setApiKey(secretKey()); try { $charge = Stripe_Charge::create(array( "amount" => 19900, "currency" => "eur", "card" => $token )); } catch (Stripe_CardError $e) { ... }
  35. 35. 1. Register online 2. Download API (back-end) 3. Get token via JavaScript (Ajax) 4. Take payment (back-end)
  36. 36. $ $
  37. 37. Testing
  38. 38. Recurring payments
  39. 39. $customer = Stripe_Customer::create(array( "card" => $token )); $customer->subscriptions->create(array( "plan" => "MY_PLAN_1" ));
  40. 40. Changing subscriptions
  41. 41. $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();
  42. 42. -$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
  43. 43. $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();
  44. 44. $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
  45. 45. Costs
  46. 46. 0.28€ + 2.95% per transaction +2% for currency exchange $0.30 + 2.9% per transaction No additional exchange rate costs for European currencies
  47. 47. Paymill Stripe 10€ 0.575€ 0.510€ 100€ 3.230€ 3.120€ 200€ 6.180€ 6.020€ 500€ 15.030€ 14.720€
  48. 48. Refunds cost zero
  49. 49. Accepted cards
  50. 50. Paymill Stripe Visa ✔ ✔ MasterCard ✔ ✔ American Express ✔ ✔ Diners Club ✔ ✘ Discovery ✔ ✘ China Union Pay ✔ ✘ JCB ✔ ✘
  51. 51. Paymill Stripe Visa Electron ✔ ✘ Visa Debit ✔ ✘ Maestro ✔ ✘ MasterCard Debit ✔ ✘
  52. 52. And the winner is…
  53. 53. Paymill Stripe Features ✔✔ ✔✔ Cards available ✔✔ ✔✔ Price ✔✔ ✔✔ Customer focus ✔✘ ✔✔ Programmability ✔✔ ✔✔
  54. 54. Keep in mind
  55. 55. 30% more test cases Validations, error-handling Data model Minimum: customers, products, orders Design Payment form, A/B test conversion, email design and copy, convey confidence Terms of use Money back guarantee, trial periods or free plans, how to handle returns Pricing Good references: “Don’t Just Roll the Dice” and “Camels and Rubber Duckies” Administration screens For customers to view payments and download invoices, change cards Other stuff Taxes, phone support
  56. 56. Questions?
  57. 57. Thank you!
  58. 58. Ivan Maeder Coderswitch @ivanmaeder

×