Unlike the early days of ecommerce, today’s consumers want the freedom to pay the way the want to. Whether it’s using a digital wallet, when their offline, from a specific region, or with cutting-edge, alternative payment solutions in addition to credit cards! Developers and Product Managers not only have to understand those varied ways to pay, but also how to get them to work in concert with one another. It can be a pretty daunting task. In fact, that’s why many businesses opt to use ready-made ecommerce or shopping-cart solutions instead! But, if you’re like me, you might want to have finer-grained control over your web properties. That’s where we come in -- Amazon Pay is here to illustrate how to make your payment solutions work for you.
Assessing your payment solutions
When looking at your payment solutions, it can be a helpful first step to categorize them by what they do and how they do it.
• Does the payment transaction process synchronously during the customer’s checkout experience, or can it be completed later on in an asynchronous or offline fashion?
• Is the payment solution really a stand-alone payment method that your customers can choose from as part of your existing checkout page, or is it meant to be its own full-featured checkout experience?
• How do you get notifications on the state of a transaction? Do they get pushed to your systems automatically, or do you need to poll and query (pull) for them?
• Can your customers grant you consent to save or re-bill their chosen payment instrument, or do they always have to initiate a new transaction themselves?
Considering this functionality can help you visualize your integrations in a way that allows for the development of pattern-based, scalable integrations. It can also help you move beyond having to build custom handlers, checkout pages, and business logic for each payment scenario you support. Instead, you can focus on building only the code that’s necessary to handle each payment method’s specific fields, APIs, and endpoints.
Synchronous vs. Asynchronous payments
Clarify whether a transaction is happening asynchronously and, or synchronously to dictate how you communicate to your customers, and when you can start fulfilling their order. Synchronous payments (happen ‘in real time’) are attractive when you need to offer customers a quick way to buy your products and want to make sure they know right away whether their transaction was successful – which is why some credit-card gateways only offer this sort of transaction.
Asynchronous payments (imagine Western Union where you physically hand over money or a check) on the other hand, are more useful when it’s not as important that a transaction happen ‘right now’ as it is that the transaction is inspected and approved. Amazon Pay supports this by letting you request a synchronous Authorization that happens right away, returning a status as part of its API response, or by requesting an asynchronous Authorization that will send your systems a notification later on.
Let’s talk notifications. The way a payment solution notifies you about a transaction is just as important as how it is processed! Depending on your infrastructure and security requirements, it can be important to have full control over inbound or outbound communications, by only polling for or ‘pulling’ that information yourself.
While this approach might be secure, not every payment solution out there supports businesses periodically sending API requests to its servers to get information on a transaction! It can be just as important to consider receiving ‘push’ notifications instead. These notifications are sent from your payment solution provider’s servers directly to an endpoint that you define. This allows you to step away from having to manage processes like ‘cron jobs’, and have a single endpoint that can have handlers (did someone say AWS Lambda functions?!) for all your payment types that support ‘push’ notifications.
Amazon Pay is here to support whichever approach makes sense for your infrastructure needs through its Instant Payment Notifications (push) and its transaction query APIs (pull). For more information on IPNs and learning how to process them, make sure and peruse our article on “The world of Instant Payment Notifications”!
Two considerations focus on your customers’ experience. How a payment solution is presented to buyers can ultimately influence their decision to proceed with a purchase