stripe支付使用指南_Stripe vs Braintree:终极指南

stripe支付使用指南

If you’re developing an app that needs to accept payments, you’ll likely consider Stripe and Braintree as payment providers.

如果您要开发需要接受付款的应用程序,则可能会将StripeBraintree视为付款提供商。

They’re a new breed of full-stack payment companies that are friendly to both businesses and developers. They take care of the nitty gritty like merchant accounts and PCI compliance, and are fairly straightforward to integrate.

它们是新一代的全栈支付公司,对企业和开发人员都友好。 他们照顾商家帐户和PCI合规性等细节,并且非常易于集成。

An unscientific review hints that Stripe is more popular among developers, with 99 StackOverflow questions in the past month, versus Braintree’s 34. Authorize.net, an older provider, had only 10, illustrating the shift toward new payment companies.

一项不科学的评论暗示,Stripe在开发人员中更受欢迎,在过去的一个月中有99个 StackOverflow问题,而Braintree则为34个 。 较老的提供者Authorize.net只有10个 ,说明正在转向新的支付公司。

This article compares Stripe and Braintree in depth, to help developers and businesses make an informed decision. I’ve used both providers in production.

本文对Stripe和Braintree进行了深入比较,以帮助开发人员和企业做出明智的决定。 我已经在生产中使用了这两个提供程序。

贝宝 (PayPal)

PayPal acquired Braintree in 2013. Since then, Braintree has made it easier than ever to accept PayPal in a modern web application.

PayPal在2013年收购了 Braintree。从那时起,Braintree使得在现代Web应用程序中接受PayPal变得前所未有的容易。

If you use Braintree to accept credit cards, there's no additional work required to accept PayPal. It's just another payment method, like Visa or MasterCard. Braintree handles all of the nuances, whether for one-time transactions or subscription payments.

如果您使用Braintree接受信用卡,则不需要其他工作即可接受PayPal。 这只是另一种付款方式,例如Visa或MasterCard。 Braintree处理所有细微差别,无论是一次性交易还是订阅付款。

Is accepting PayPal important to your business? If so, there’s a strong case for Braintree.

接受贝宝对您的业务很重要吗? 如果是这样,那么Braintree就是一个很好的例子。

Stripe currently has no PayPal integration.

Stripe当前没有PayPal集成。

Winner: Braintree. It provides the smoothest PayPal integration available for most sites.

优胜者:Braintree。 它为大多数站点提供了最流畅的PayPal集成。

Braintree’s “drop-in” PayPal and credit card form

Braintree的“嵌入式” PayPal和信用卡表格

付款方式,前端 (Payment Forms, Front-end)

Stripe and Braintree offer pre-built payment forms that you can bring onto your site:

Stripe和Braintree提供了预先构建的付款表格,您可以将其带到您的网站上:

Braintree Drop-in UI is my personal preference. It appears in-line, blending in with your UI. It can also include a PayPal button, allowing the customer to log in to PayPal without leaving your site.

我个人偏爱Braintree Drop-in UI。 它以嵌入式方式出现,并与您的UI融合在一起。 它还可以包括一个PayPal按钮,使客户无需离开您的网站即可登录PayPal。

In addition to pre-built forms, both Stripe and Braintree allow you to create your own.

除了预先构建的表单外,Stripe和Braintree都允许您创建自己的表单。

Braintree requires your server to retrieve a one-time client token from Braintree's API before displaying a payment form, whether using its Drop-in UI or hosted fields (its custom form solution). Stripe doesn't require your server to retrieve a one-time token before the client renders the payment form, saving a step and likely cutting load time by 1–2 seconds.

Braintree要求您的服务器在显示付款表单之前,无论是使用其Drop-in UI还是托管字段(其自定义表单解决方案),都必须从Braintree的API检索一次性客户端令牌 。 Stripe不需要您的服务器在客户端呈现付款表单之前检索一次性令牌,从而节省了一步,并有可能将加载时间缩短1-2秒。

Winner: Tie. Braintree provides a better universal payment UI but requires an additional server request that can delay loading by 1–2 seconds.

优胜者:领带。 Braintree提供了更好的通用支付UI,但需要额外的服务器请求,这可能会使加载延迟1-2秒。

Braintree form vs Stripe form

Braintree形式Stripe形式

支持 (Support)

I sent the following question to both Stripe and Braintree early on a Monday:

我在周一早些时候将以下问题同时发送给Stripe和Braintree:

Hello, what's the best way to get a human-readable reason why a credit card was declined? Can I get this when creating a subscription as well as when a card is declined during an existing subscription?

您好,最好的方法是让人们理解为什么信用卡被拒的原因? 创建订阅时以及在现有订阅过程中卡被拒签时,我可以得到此信息吗?

Braintree responded in 6 hours. Stripe responded in about a day and a half. Both answers addressed the question, but Braintree was much faster in responding.

Braintree在6小时内做出了回应。 条纹在大约一天半的时间内做出了回应。 这两个答案都解决了这个问题,但是Braintree的回答速度要快得多。

This is consistent with my previous experience with both companies. Braintree has responded to my requests within 6 hours on weekdays and 24 hours on weekends.

这与我之前在两家公司的经历是一致的。 Braintree已在工作日的6小时内和周末的24小时内回复了我的请求。

Braintree’s primary support is through email (support@braintreepayments.com) and phone. Stripe’s is through a web form with no phone support available.

Braintree的主要支持是通过电子邮件( support@braintreepayments.com )和电话。 Stripe是通过网络表单提供的,没有电话支持。

Both companies are engaged on GitHub. Their libraries are open sourced there, and they respond directly on the issue pages for each. (Examples: Stripe, Braintree.)

两家公司都在GitHub上合作。 他们的库在那儿都是开源的,它们直接在每个问题的页面上回应。 (例如: StripeBraintree 。)

Both companies are engaged on Twitter, their feeds showing that they respond directly to developers in a short period of time. (Examples: Stripe, Braintree.)

两家公司都在Twitter上互动,其供稿显示他们在短时间内直接对开发人员做出了回应。 (例如: StripeBraintree 。)

Braintree is engaged on StackOverflow, a popular Q&A forum for developers. Of four Braintree questions on September 19, Braintree responded to two directly. Stripe questions on StackOverflow generally don’t get an official response.

Braintree参与了StackOverflow,这是一个受开发人员欢迎的问答论坛。 9月19日,在布伦特里的四个问题中 ,布伦特里直接回答了两个。 关于StackOverflow的条带化问题通常不会得到官方答复。

Stripe has an IRC channel, a wonderful excuse to re-download your favorite client. You may or may not reach someone on the team.

Stripe有一个IRC频道,是重新下载您喜欢的客户端的绝佳借口。 您可能会也可能不会到达团队中的某人。

Winner: Braintree. Both provide good support, but Braintree’s is faster and more available.

优胜者:Braintree。 两者都提供了良好的支持,但是Braintree的速度更快,可用性更高。

打折 (Discounts)

Both Stripe and Braintree support discounts for subscriptions. Customers might receive $5 off their first month’s subscription fee, for instance.

Stripe和Braintree均支持订阅折扣。 例如,客户可能会在第一个月的订阅费用中获得$ 5的折扣。

Discounts work roughly the same for each service. An admin creates a discount in the dashboard, and API calls from your app can apply that discount.

每种服务的折扣大致相同。 管理员会在信息中心中创建折扣,并且您应用中的API调用可以应用该折扣。

There are differences that will impact how you implement discounts, however, and these reveal that Stripe is stronger in this area.

但是,存在一些差异会影响您实施折扣的方式,这些差异表明Stripe在该领域更强大。

  • Braintree doesn't support percentage discounts (e.g. 25% off); Stripe does. In Braintree, if you have a 25% discount that applies to your monthly, quarterly, and annual plans, you need to create a separate discount for each plan, each for a different amount. With Stripe, you can create one 25% off coupon that applies to all three plans.

    Braintree不支持百分比折扣(例如25%的折扣); 条纹呢。 在Braintree中,如果您的每月,季度和年度计划有25%的折扣,则需要为每个计划分别创建一个折扣,每个折扣金额不同。 使用Stripe,您可以创建一张适用于所有三个计划的25%优惠券。
  • Braintree doesn't support expiration dates for coupons; Stripe does.

    Braintree不支持优惠券的有效期; 条纹呢。

Thus, with Braintree, you’ll do a bit more work if your plans have different billing cycles (e.g. monthly and quarterly) or your discounts are available only for a limited time.

因此,如果您的计划的帐单周期不同(例如,每月和每季度),或者折扣仅在有限的时间内可用,那么使用Braintree,您会做更多的工作。

Winner: Stripe. Its discounts offer more functionality, including percentage-off and expiration dates.

优胜者:条纹。 它的折扣提供更多功能,包括折价和有效期。

升级和按比例分配 (Upgrades and Proration)

Both Stripe and Braintree smoothly handle upgrades between plans that share the same billing cycle. For instance, if someone needs to upgrade from your monthly Silver plan to your monthly Gold plan, a simple API call to either service does the trick.

Stripe和Braintree均可顺利处理共享同一计费周期的计划之间的升级。 例如,如果某人需要从您的每月白银计划升级到您的每月金本计划,则对这两种服务的简单API调用就可以解决问题。

Braintree cannot, however, process upgrades from plans with different billing cycles—say, a monthly plan to a quarterly plan. You’d need to roll your own upgrade logic (reach out to me for tips). Stripe, on the other hand, handles these complex upgrades and applies prorated pricing.

但是,Braintree无法将流程从具有不同计费周期的计划(例如,每月计划升级为季度计划)进行升级。 您需要推出自己的升级逻辑( 与我联系以获取提示)。 另一方面,Stripe处理这些复杂的升级并应用按比例定价。

Winner: Stripe. Unlike Braintree, it handles proration across different billing cycles.

优胜者:条纹。 与Braintree不同,它可以处理不同计费周期的按比例分配。

服务器整合 (Server Integration)

Both Stripe and Braintree provide libraries for various programming languages. Generally, they’re open sourced, documented, and supported.

Stripe和Braintree都提供了用于各种编程语言的库。 通常,它们是开源的,有文档的和受支持的。

I’ve integrated both services' Ruby libraries. They’re perfectly adequate, allowing you to create and update subscriptions, perform one-time transactions, and receive webhooks.

我已经集成了这两个服务的Ruby库。 它们非常合适,使您可以创建和更新订阅,执行一次性交易并接收Webhook。

Winner: Tie. Strong developer libraries are core to both Stripe and Braintree.

优胜者:领带。 强大的开发人员库是Stripe和Braintree的核心。

文献资料 (Documentation)

You’ll need to master the API of the service you choose, and to do that you’ll lean heavily on documentation.

您需要掌握所选择服务的API,并且必须依靠文档。

Stripe’s documentation is more precise than Braintree’s. I haven’t seen a phrase in Stripe’s documentation that is ambiguous or open to interpretation. Braintree’s, on the other hand, can be a little more vague.

Stripe的文档比Braintree的文档更精确。 我在Stripe的文档中没有看到一个模棱两可或易于解释的短语。 另一方面,布伦特里的大脑可能会更加模糊。

For instance, Braintree can notify your app (through a webhook) when it has tried and failed to charge a customer for a subscription. Part of what it passes is the failure_count, which it defined as the number of times the gateway has retried a charge on a past due subscription.

例如,Braintree可以在尝试向客户收取订阅费用失败时(通过Webhook)通知您的应用程序。 它传递的部分内容是failure_count ,它定义为网关针对过期订阅重试收费的次数。

Note the word retried. Does the failure_count include the first failure or just the retries afterward?

注意单词重试。 failure_count是否包含第一个故障,还是仅包含随后的重试?

I emailed and tweeted Braintree this question and got opposite answers. The Twitter answer turned out to be correct.

我通过电子邮件发送了此问题,并在Twitter上发布了Braintree,得到了相反的答案。 Twitter的答案原来是正确的。

Braintree has already fixed their docs, changing retried to tried. I commend Braintree’s response and hope they further tighten and clarify their documentation.

Braintree已经修复了他们的文档 ,并尝试重 试。 我赞扬Braintree的回应,并希望他们进一步收紧并澄清其文档。

That being said, both services have well-structured documentation, organized by programming language—allowing developers to get specific guidance for their toolsets. Having implemented both services from scratch, though, Stripe’s docs have me scratching my head a little less.

话虽这么说,这两种服务都具有通过编程语言组织的结构良好的文档,从而使开发人员可以获取有关其工具集的特定指南。 但是,从零开始实现了这两种服务之后,Stripe的文档让我省了很多力气。

Winner: Stripe. Its documentation wins on depth and clarity.

优胜者:条纹。 其文档赢得了深度和清晰度。

过期的信用卡 (Expired Credit Cards)

Both Stripe and Braintree have arrangements with credit card companies to automatically update credit cards that are about to expire. In many cases, customers obtaining a replacement card don't need to update their credit card information. This likely reduces churn and helps your business.

StripeBraintree都与信用卡公司达成了安排,以自动更新即将过期的信用卡。 在许多情况下,获得补发卡的客户不需要更新其信用卡信息。 这可能会减少客户流失并帮助您的业务。

With Braintree, you have to request this feature, a quick and free process. With Stripe, it’s automatic.

使用Braintree,您必须请求此功能这是一个快速,免费的过程。 使用Stripe,它是自动的。

Winner: Tie. Both services auto-update expired cards. Remember to request the feature from Braintree.

优胜者:领带。 两种服务都会自动更新过期的卡。 记住要向Braintree请求该功能。

试用期 (Trial Periods)

Stripe and Braintree allow for trial periods on subscriptions, but only Stripe allows a customer to trial without a credit card.

Stripe和Braintree允许订阅的试用期,但只有Stripe允许客户无需信用卡即可试用。

Stripe trial periods don't require a payment method. If the trial period ends and the customer hasn't provided payment information, Stripe registers a delinquent payment. You can use webhooks to kindly ask the customer to enter billing information. After your (customizable) retry limit is exceeded, Stripe cancels the customer’s account.

条纹试用期不需要付款方式。 如果试用期结束且客户未提供付款信息,则Stripe登记拖欠付款。 您可以使用webhook要求客户输入帐单信息。 超过您的(可自定义)重试限制后,Stripe取消客户的帐户。

Braintree, on the other hand, requires payment information even for a trial account. So, if you want to offer a free trial with no credit card and you’re using Braintree, you’ll have to write more code than you would with Stripe.

另一方面,Braintree甚至要求提供试用帐户付款信息。 因此,如果您想提供不使用信用卡的免费试用版,并且使用的是Braintree,您将需要编写比Stripe更多的代码。

Winner: Stripe. It doesn’t require a payment method for trial periods, and Braintree does.

优胜者:条纹。 试用期间不需要付款方式,Braintree则需要。

网络挂钩 (Webhooks)

Your payment processor will need to let your app know about certain events. For instance, if an account is cancelled due to delinquent payments, you may need to adjust the user’s access in your app so they no longer have access to premium areas.

您的付款处理器将需要让您的应用知道某些事件。 例如,如果由于拖欠付款而取消了帐户,则可能需要调整用户在您的应用中的访问权限,以使他们不再有权访问高级区域。

Both Stripe and Braintree have webhooks that tell your app about certain events. They’re pretty similar for most uses.

Stripe和Braintree都有网络钩子,可以告诉您的应用某些事件。 对于大多数用途,它们非常相似。

Stripe distinguishes itself with robust webhook status and logs, available from its dashboard. You can see which webhooks have failed, for instance. Braintree doesn't offer this; only their support staff can check the webhook logs.

Stripe通过强大的Webhook状态和日志(可从其仪表板获得)来与众不同。 例如,您可以查看哪些webhook失败。 Braintree不提供此功能; 只有他们的支持人员才能查看webhook日志。

Winner: Stripe. It shows webhook status and logs in its dashboard, unlike Braintree.

优胜者:条纹。 与Braintree不同,它显示webhook状态并在其仪表板中登录。

消除 (Cancellation)

In the unfortunate event a customer cancels their account, you may want them to retain access for the remainder of the current billing period. (They paid for it, after all!)

如果不幸的是,客户取消了他们的帐户,您可能希望他们在当前计费期的剩余时间内保留访问权限。 (毕竟,他们为此付出了代价!)

With Stripe, you can cancel an account effective at the end of the billing period. At the end of the period, Stripe sends a subscription_deleted webhook to your app, at which point your app knows to cut off the user’s access.

使用Stripe,您可以在结算期结束时取消有效的帐户。 在此期间结束时,Stripe将一个subscription_deleted Webhook发送到您的应用程序,此时您的应用程序知道将切断用户的访问权限。

With Braintree, all cancellations are effective immediately. There is nothing to notify your app of the end of the current period. So, your app has to remember to cut off the user’s access at the end of the period, and until then there’s an odd discrepancy where the user’s Braintree subscription is cancelled but they still have access.

使用Braintree,所有取消立即生效。 没有什么可以通知您的应用当前周期的结束。 因此,您的应用必须记住在此期间结束时切断用户的访问权限,直到那时为止,存在一个奇怪的差异,即该用户的Braintree订阅被取消,但他们仍然可以访问。

Overall, I believe Stripe’s cancellation logic makes more sense. If you use Braintree and would like cancellations to take effect at the end of the billing period, you'll need to do some additional coding. Feel free to reach out to me for tips.

总的来说,我相信Stripe的取消逻辑更有意义。 如果您使用Braintree,并且希望取消在结算期结束后生效,则您需要进行一些其他编码。 请随时与我联系以获取提示。

Winner: Stripe. Its cancellation flow makes more sense for most sites.

优胜者:条纹。 对于大多数站点,其取消流程更有意义。

测试中 (Testing)

If you're using a service like Stripe or Braintree, commerce is likely critical to your site. You'll want to test each service yourself, and then implement automated tests to ensure they continue to work in the future.

如果您使用的是Stripe或Braintree之类的服务,则商务可能对您的站点至关重要。 您需要自己测试每个服务,然后实施自动化测试以确保它们将来继续工作。

Stripe and Braintree both offer test environments, with their own dashboards and test API keys that you can place into your app. This allows you to click around your app in development to create fake subscriptions and charges, and review those in the dashboard.

Stripe和Braintree都提供了测试环境,它们具有自己的仪表板和测试API密钥,您可以将它们放入应用程序中。 这使您可以在开发中的应用程序周围单击,以创建虚假的订阅和费用,并在仪表板上查看它们。

You can sign up for Braintree’s and Stripe’s test environments without providing any banking information. At that point, you can use the service in development. Before using the service in production, you’ll need to submit your personal and banking information for approval. Both services approve within a few days, generally.

您可以注册Braintree和Stripe的测试环境,而无需提供任何银行信息。 此时,您可以在开发中使用该服务。 在生产中使用该服务之前,您需要提交您的个人和银行信息以供批准。 通常,这两项服务都会在几天内获得批准。

Both Stripe and Braintree are amenable to automatic testing. Braintree has more testing features built into its library than Stripe does—like fake webhooks and payment nonces (which can generate various payment errors). Stripe offers the ability to send fake webhooks from its dashboard to your app on dev. You’ll likely need to supplement Stripe’s library with tools like stripe-ruby-mock, where Braintree’s library can likely support good testing on its own.

Stripe和Braintree均适用于自动测试。 与Stripe相比, Braintree的库中内置了更多的测试功能,例如伪造的Webhooks和付款随机数(可能会产生各种付款错误)。 Stripe能够将假Webhooks从其仪表板发送到开发人员的应用程序。 您可能需要使用诸如stripe-ruby-mock之类的工具来补充Stripe的库,而Braintree的库可能会自己支持良好的测试。

Winner: Tie. Both services offer sandboxes with a low barrier to entry, and helpers for automated tests.

优胜者:领带。 两种服务都提供了较低的进入门槛的沙箱和自动测试的帮助程序。

仪表板 (Dashboard)

As an account owner with Stripe or Braintree, you’ll have access to a dashboard where you can view customers, subscriptions, and payments. Both services offer the ability to manage this information, provide refunds, and change account settings.

作为Stripe或Braintree的帐户所有者,您可以访问仪表板,在其中可以查看客户,订阅和付款。 两种服务都可以管理此信息,提供退款以及更改帐户设置。

Winner: Tie. Both services offer common admin tasks in a user-friendly dashboard.

优胜者:领带。 两种服务都在用户友好的仪表板上提供常见的管理任务。

总体印象 (Overall Impressions)

Your decision will depend upon how important each feature is to you.

您的决定将取决于每个功能对您的重要性。

Braintree offers PayPal integration and more responsive support. If PayPal is core to your business case, Braintree will make integrating it a lot easier and will likely be your pick. If you anticipate having a lot of questions not covered in documentation, Braintree’s support may win you over.

Braintree提供PayPal集成和更快速的支持。 如果贝宝(PayPal)是您业务案例的核心,那么Braintree将使集成变得更加容易,并且很可能会成为您的选择。 如果您预计会有很多文档中未涵盖的问题,那么Braintree的支持可能会吸引您。

Stripe has superior documentation, trial periods, discounts, webhooks, and upgrades. You don’t have to work around Stripe like you sometimes have to do with Braintree. If your app has no-credit-card free trials or upgrades to different billing cycles, you may select Stripe to save some development time. If you're an experienced developer and PayPal isn’t in the business case, you may lean toward Stripe.

Stripe具有出色的文档,试用期,折扣,网络挂钩和升级。 您不必像有时需要使用Braintree那样处理 Stripe。 如果您的应用程序具有无信用卡免费试用版或升级到不同的计费周期,则可以选择Stripe以节省一些开发时间。 如果您是经验丰富的开发人员,而PayPal不在业务范围内,则您可能会倾向于Stripe。

From here, check out the quick start guides for Stripe and Braintree. Sign up for their sandboxes, install their libraries on your app in dev, and get a feel for their different approaches. Take comfort that both companies are on the cutting edge of payments, but note their differences.

从这里,查看StripeBraintree的快速入门指南。 注册他们的沙箱,在开发人员的应用程序上安装他们的库,并了解他们的不同方法。 请放心,两家公司都处于付款的最前沿,但请注意它们之间的差异。

翻译自: https://www.sitepoint.com/stripe-vs-braintree-the-ultimate-guide/

stripe支付使用指南

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值