paymill vs stripe
DESCRIPTION
Charla sobre Paymill vs Stripe por Ivan Maeder en Betabeers Madrid Junio 2014.TRANSCRIPT
Paymill or Stripe?Betabeers Madrid 44
Ivan MaederCoderswitch@ivanmaeder
My experience
1 price point (non-recurring)
June 2013
Multiple price points (recurring and non-recurring)
March 2014
$199 $199$99/month$49
/month
What are Paymill and Stripe?
if (paymill == stripe) printf("They work the same way");else printf("They work the same way");
Then why did you change?
Lots of little things that add up
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
Shut up and code
1. Register online2. Download API (back-end)3. Get token via JavaScript (Ajax)4. Take payment (back-end)
1. Register online2. Download API (back-end)3. Get token via JavaScript (Ajax)4. Take payment (back-end)
Paymill StripeC# ✔ Community
Go ✘ Community
Java ✔ ✔
Node.js ✔ ✔
Perl ✘ Community
PHP ✔ ✔
Python ✔ ✔
Ruby ✔ ✔
Paymill StripeAndroid ✔ ✔
iOS ✔ ✔
1. Register online2. Download API (back-end)3. Get token via JavaScript (Ajax)4. Take payment (back-end)
Paymill
<form> <input name="card-number"> <input name="card-expiry"> <input name="card-security-code"></form>
<form> <input name="card-number"> <input name="card-expiry"> <input name="card-security-code"></form>
<form> <input class="card-number"> <input class="card-expiry"> <input class="card-security-code"></form>
<form> <input type="hidden" name="token"> <input class="card-number"> <input class="card-expiry"> <input class="card-security-code"></form>
<script> var PAYMILL_PUBLIC_KEY = "<$= publicKey() ?>";</script>
<script src="https://bridge.paymill.com/"></script>
$('form').submit(function() { ...
if (paymill.validateCardNumber(cardNumber)) { ...
paymill.createToken({ "number": cardNumber, ... "amount_int": 19900, "currency": EUR }, paymillResponseHandler);
return false;});
function paymillResponseHandler(error, result) { if (error) { ... } else { $('input[name="token"]').val(result.token); }
$('form').submit();}
That was Paymill
That was PaymillThis is Sparta Stripe
<script src="https://js.stripe.com/v2/"></script>
<script> Stripe.setPublishableKey("<$= publicKey() ?>");</script>
<form> <input type="hidden" name="token"> <input class="card-number"> <input class="card-expiry"> <input class="card-security-code"></form>
<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>
$('form').submit(function() { ...
if (Stripe.card.validateCardNumber(cardNumber)) { ...
Stripe.card.createToken($('form'), stripeResponseHandler);
return false;});
function stripeResponseHandler(statusCode, response) { if (statusCode != 200) { ... } else { $('input[name="token"]').val(response.id); }
$('form').submit();}
1. Register online2. Download API (back-end)3. Get token via JavaScript (Ajax)4. Take payment (back-end)
Paymill (PHP)
$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) { ...}
Stripe (PHP)
Stripe::setApiKey(secretKey());
try { $charge = Stripe_Charge::create(array( "amount" => 19900, "currency" => "eur", "card" => $token ));} catch (Stripe_CardError $e) { ...}
1. Register online2. Download API (back-end)3. Get token via JavaScript (Ajax)4. Take payment (back-end)
$
$
Testing
Recurring payments
$customer = Stripe_Customer::create(array( "card" => $token));
$customer->subscriptions->create(array( "plan" => "MY_PLAN_1"));
Changing subscriptions
$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();
-$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
$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();
$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
Costs
0.28€ + 2.95%per transaction
+2% for currency exchange
$0.30 + 2.9%per transaction
No additional exchange rate costs for European
currencies
Paymill Stripe
10€ 0.575€ 0.510€
100€ 3.230€ 3.120€
200€ 6.180€ 6.020€
500€ 15.030€ 14.720€
Refunds cost zero
Accepted cards
Paymill StripeVisa ✔ ✔
MasterCard ✔ ✔
American Express ✔ ✔
Diners Club ✔ ✘
Discovery ✔ ✘
China Union Pay ✔ ✘
JCB ✔ ✘
Paymill StripeVisa Electron ✔ ✘
Visa Debit ✔ ✘
Maestro ✔ ✘
MasterCard Debit ✔ ✘
And the winner is…
Paymill Stripe
Features ✔✔ ✔✔
Cards available ✔✔ ✔✔
Price ✔✔ ✔✔
Customer focus ✔✘ ✔✔
Programmability ✔✔ ✔✔
Keep in mind
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
Questions?
Thank you!
Ivan MaederCoderswitch@ivanmaeder