12 Paying for pizza

 

This chapter covers

  • Processing payments with serverless applications
  • Implementing payments to your serverless API
  • Understanding the PCI compliance in payment processing

Enter your card number and your card’s expiration date. Now, enter your card’s security code. Everyone knows this sequence. Receiving payments for products or services is the most valuable step for almost every business. So far, you’ve been learning mostly how to develop serverless applications that provide useful services, such as pizza ordering and delivery. But you should also know how to receive payments from Aunt Maria’s customers.

This chapter starts by analyzing how to enable online payments for Aunt Maria’s pizzeria. You’ll see how a payment travels from your customer, to your payment processor, and then to Aunt Maria’s company. Then, you’ll learn how to implement a payment service for Aunt Maria. Afterward, you’ll examine the safety of your serverless payment service and discover how standards compliance helps with that.

12.1 Payment transactions

According to Aunt Maria, “Everything should revolve around customer needs.” Her business has begun to expand, and she has received more than a hundred requests from customers to enable online payments in both the mobile and web applications. Therefore, she has asked you to help her implement accepting payments with the serverless Pizza API.

12.1.1 Implementing an online payment

12.2 Implementing your payment service

12.3 Could someone hack your payment service?

12.3.1 Standards

12.3.2 Competence

12.4 Taste it!

12.4.1 Exercise

12.4.2 Solution

Summary