On this page
No Headings
Last updated: June 4, 2026
To set up recurring payments using Apple Pay on the Web, integrate Apple Pay as a payment method on the checkout page. Refer to the Apple Pay Developer Documentation for guidance on adding Apple Pay as a payment option.
After buyers authorize the payment, configure your client-side code to invoke the createOrder function in your server-side code to create an order and capture the payment.
For recurring payments, the customer initiates the first payment using the Create Order API. The merchant initiates subsequent transactions after obtaining the buyer's consent to charge them.
To indicate Apple Pay as the payment method, include the apple_pay object in the payment_source of the POST v2/checkout/orders request body.
Additionally, include stored_credential to provide details about recurring transactions that include payment_initiator, payment_type and usage.
API endpoint used: Create order
curl -v -X POST https://api-m.sandbox.paypal.com/v2/checkout/orders \
-H "Content-Type: application/json"\
-H "Authorization: Bearer <Access-Token>"\
-H 'PayPal-Partner-Attribution-Id: <BN-Code>' \
d ' {
"intent": "CAPTURE",
"purchase_units": [
{
"reference_id": "REFID-000-1002",
"amount": {
"currency_code": "USD",
"value": "10.00"
},
"payee": {
"merchant_id": "QQCHDN9M6DR9E"
}
}
],
"payment_source": {
"apple_pay": {
"id": "021338536138619246596C1DDF7025C3B349CF48E35BECFA8C4F879BE5AED13F",
"name": "John Doe",
"email_address": "johndoe@gmail.com",
"decrypted_token": {
"transaction_amount": {
"currency_code": "USD",
"value": "10.00"
},
"tokenized_card": {
"number": "5491281334659506",
"expiry": "2028-03",
"billing_address": {
"address_line_1": "2211 N 1st St",
"address_line_2": "Building 15",
"admin_area_2": "San Jose",
"admin_area_1": "CA",
"postal_code": "95131",
"country_code": "US"
}
},
"device_manufacturer_id": "050110030273",
"payment_data_type": "3DSECURE",
"payment_data": {
"cryptogram": "AECVdCK4YqjIABDuAaOCAoABFA==",
"emv_data": "emv_data"
},
"stored_credential": {
"payment_type": "RECURRING",
"payment_initiator": "CUSTOMER",
"usage": "FIRST"
}
}
}
}
},Copy the code snippet and modify the values for stored_credential as needed.
A successful request results in the following:
201 Created.API endpoint used: Create order
curl -v -X POST https://api-m.sandbox.paypal.com/v2/checkout/orders \
-H "Content-Type: application/json"\
-H "Authorization: Bearer <Access-Token>"\
-H 'PayPal-Partner-Attribution-Id: <BN-Code>' \
d ' {
"intent": "CAPTURE",
"purchase_units": [
{
"reference_id": "REFID-000-1002",
"amount": {
"currency_code": "USD",
"value": "10.00"
},
"payee": {
"merchant_id": "QQCHDN9M6DR9E"
}
}
],
"payment_source": {
"apple_pay": {
"id": "021338536138619246596C1DDF7025C3B349CF48E35BECFA8C4F879BE5AED13F",
"name": "John Doe",
"email_address": "johndoe@gmail.com",
"decrypted_token": {
"transaction_amount": {
"currency_code": "USD",
"value": "10.00"
},
"tokenized_card": {
"number": "5491281334659506",
"expiry": "2028-03",
"billing_address": {
"address_line_1": "2211 N 1st St",
"address_line_2": "Building 15",
"admin_area_2": "San Jose",
"admin_area_1": "CA",
"postal_code": "95131",
"country_code": "US"
}
},
"stored_credential": {
"payment_type": "RECURRING",
"payment_initiator": "MERCHANT",
"usage": "SUBSEQUENT",
"previous_transaction_reference": "0D026078A2978501F"
}
}
}
}
},Copy the code snippet and modify the values for stored_credential as needed.
A successful request results in the following:
201 Created.Note:
device_manufacturer_id, payment_data_type, and payment_data are not applicable for merchant-initiated transactions.previous_transaction_reference or previous_network_transaction_reference is applicable only for merchant-initiated transactions and only one of these can be present in the request.| Input parameter | Possible values |
|---|---|
payment_initiator(required) |
|
payment_type(required) |
|
usage |
|
previous_transaction_reference | PayPal transaction ID previously used to charge the buyer. Shows payment processors that you have established a contract with the buyer. |
previous_network_transaction_reference |
|
You can use these common scenarios to determine how you'll update your integration.
| Scenario | Payment initiator | Payment type | Usage |
|---|---|---|---|
| Initial transaction to sign up for the recurring charges. Buyer has approved to save or has already saved their card with the merchant. | CUSTOMER | RECURRING | FIRST |
| Merchant processes recurring charge with PayPal. | MERCHANT | RECURRING | SUBSEQUENT |
| Scenario | Payment initiator | Payment type | Usage |
|---|---|---|---|
| Initial transaction to sign up for the unscheduled charges. Buyer has approved to save or has already saved their card with the merchant. | CUSTOMER | UNSCHEDULED | FIRST |
| Merchant processes recurring charge with PayPal. | MERCHANT | UNSCHEDULED | SUBSEQUENT |