Airwallex logo

Cash App Pay recurring payments

Copy for LLMView as Markdown

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 Payment Intent

Create a Payment Intent with the Create a Payment Intent API API.

Shell
1curl -X POST https://api-demo.airwallex.com/api/v1/pa/payment_intents/create \
2 -H 'Content-Type: application/json' \
3 -H 'Authorization: Bearer {{ACCESS_TOKEN}}' \
4 -d '{
5 "request_id": "ed11e38a-7234-11ea-aa94-7fd44ffd1b89",
6 "amount": 100,
7 "currency": "USD",
8 "merchant_order_id": "85d7b0e0-7235-11ea-862e-9f6aa1adfca6",
9 "return_url": "https://www.airwallex.com"
10 }'

If the payment is not intended to charge the shopper for the first time, such as a subscription with a free trial, please set the amount to zero.

Step 3: Confirm the Payment Intent With Consent Info

When you want to redirect the shopper to authorize the consent with Cash App Pay, call the Confirm a Payment Intent API API with the Payment Consent info to get a redirect URL.

Shell
1curl -X POST https://api-demo.airwallex.com/api/v1/pa/payment_intents/{{PAYMENT_INTENT_ID}}/confirm \
2 -H 'Content-Type: application/json' \
3 -H 'Authorization: Bearer {{ACCESS_TOKEN}}' \
4 -d '{
5 "request_id": "fb66c21a-946d-4ed6-869e-3352b44c9cc2",
6 "customer_id": "cus_sgstnkfm8hh1c67xex6",
7 "payment_method": {
8 "type": "cash_app_pay"
9 },
10 "payment_consent": {
11 "next_triggered_by": "merchant",
12 "merchant_trigger_reason": "unscheduled",
13 "terms_of_use": {
14 "payment_amount_type": "VARIABLE"
15 }
16 }
17 }'

Once the shopper completes the payment, 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.

By default, auto_capture is set to true. If you want to set it to false, specify payment_method_options.cash_app_pay.auto_capture when confirming the Payment Intent, for example:

Shell
1curl -X POST https://api-demo.airwallex.com/api/v1/pa/payment_intents/{{PAYMENT_INTENT_ID}}/confirm \
2 -H 'Content-Type: application/json' \
3 -H 'Authorization: Bearer {{ACCESS_TOKEN}}' \
4 -d '{
5 "request_id": "fb66c21a-946d-4ed6-869e-3352b44c9cc2",
6 "customer_id": "cst_sgstq4rk4hh1e55v2hq",
7 "payment_method": {
8 "type": "cash_app_pay"
9 },
10 "payment_consent": {
11 "next_triggered_by": "merchant",
12 "merchant_trigger_reason": "unscheduled",
13 "terms_of_use": {
14 "payment_amount_type": "VARIABLE"
15 }
16 },
17 "payment_method_options": {
18 "cash_app_pay": {
19 "auto_capture": false
20 }
21 }
22 }'

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.

Shell
1curl -X POST https://api-demo.airwallex.com/api/v1/pa/payment_intents/create \
2 -H 'Content-Type: application/json' \
3 -H 'Authorization: Bearer {{ACCESS_TOKEN}}' \
4 -d '{
5 "request_id": "ed11e38a-7234-11ea-aa94-7fd44ffd1b89",
6 "amount": 100,
7 "currency": "USD",
8 "merchant_order_id": "85d7b0e0-7235-11ea-862e-9f6aa1adfca6",
9 "return_url": "https://www.airwallex.com"
10 }'

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.

Sample request:

Shell
1curl -X POST https://api-demo.airwallex.com/api/v1/pa/payment_intents/{{PAYMENT_INTENT_ID}}/confirm \
2 -H 'Content-Type: application/json' \
3 -H 'Authorization: Bearer {{ACCESS_TOKEN}}' \
4 -d '{
5 "request_id": "b9c01d9f-493d-4362-a7f2-c46989814b24",
6 "payment_consent_id": "cst_sgstq4rk4hh1e55v2hq"
7 }'

Sample response:

JSON
1{
2 "id": "int_sgst7h5p4hh1e9dhcvo",
3 "request_id": "b9c01d9f-493d-4362-a7f2-c46989814b24",
4 "amount": 70,
5 "currency": "USD",
6 "merchant_order_id": "bae8fca0-c571-4cc3-9a74-af197835ebff",
7 "status": "PENDING",
8 "captured_amount": 0,
9 "created_at": "2026-03-27T04:58:57+0000",
10 "updated_at": "2026-03-27T04:59:00+0000",
11 "return_url": "https://www.airwallex.com/",
12 "base_amount": 70,
13 "base_currency": "USD"
14 // ...
15}
Was this page helpful?