PayPal recurring payments
When processing a payment for the first time
Step 1: Create a Customer
Create a customer with the Create a Customer API API if the customer is new. Otherwise, this step is optional.
Step 2 : Create a Consent
Create a Payment Consent with the Create a Payment Conset API API.
POST /api/v1/pa/payment_consents/create
Step 3 : Authorize the Consent
You have 2 authorization options, either by collecting the consent first or collecting the consent together with the first payment.
Option 1 : Authorize by Verify the Consent
Verify the consent with Verify a PaymentConsent API.
POST /api/v1/pa/payment_consents/{id}/verify
Option 2 : Authorize by Pay the Order
Step 1 : Create an Intent
Create a Payment Intent with the Create a Payment Intent API API.
POST /api/v1/pa/payment_intents/create
step 2 : Confirm the Intent
Confirm the Intent with the Confirm a Payment Intent API API.
POST /api/v1/pa/payment_intents/{id}/confirm
Once the shopper completes the payment or authorize the consent, the Payment Consent will be verified automatically, and Airwallex will notify you of the Payment Consent status asynchronously via the webhook. Please refer to the webhook documentation to set up your webhook accordingly.
When initiating a subsequent transaction
Step 1: Initialize a Payment Intent
When you are ready to process the subsequent recurring payment, create a Payment Intent with the Create a Payment Intent API API.
Step 2. Complete payment with verified consent
Confirm the subsequent payment with the verified Payment Consent by calling the Confirm a Payment Intent API API.
POST /api/v1/pa/payment_intents/{id}/confirm