On this page
No Headings
Last updated: July 24, 2026
After customers save their PayPal Wallet, they can select it for faster checkout. Customers won't have to enter payment details for future transactions.
You can use the Orders API to create a transaction and save the payer's PayPal Wallet.
Use a direct integration with the Orders API if you:
To save a payment method outside of a purchase, use the Vault Payment Method API.
Important: Don't save PayPal as a payment method during purchase. For more information about securely saving payment methods and optimizing the buyer experience, see our Best practices guide.
When a payer on your website saves their payment method, PayPal creates a customer record. PayPal then encrypts the payment method information and stores it in a digital vault. The vault is accessible only by the billing agreement holder.
The checkout process is now shorter because it uses saved payment information.
Enable the vaulting feature in the Developer Dashboard for both your sandbox and production apps before you integrate.
Set up your sandbox business account to save payment methods:
Set up your live business account to save payment methods:
Set up your server to call the Create Order API. The button that the payer selects determines the payment_source sent in the following sample. In the following sample, the payment_source is paypal. The vault parameters in the request save the payment_source for future use by the payer.
curl -v -X POST https://api-m.sandbox.paypal.com/v2/checkout/orders/ \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ACCESS-TOKEN" \
-d '{
"intent": "CAPTURE",
"payment_source": {
"paypal": {
"attributes": {
"vault": {
"store_in_vault": "ON_SUCCESS",
"usage_type": "MERCHANT"
}
},
"experience_context": {
"return_url": "https://example.com/returnUrl",
"cancel_url": "https://example.com/cancelUrl"
}
}
},
"purchase_units": [
{
"amount": {
"currency_code": "USD",
"value": "100.00"
}
}
]
}'Note the status of the response. Some payment sources need payer approval before payment. If so, return the id back to your client to redirect the payer to a flow where they approve the payment method.
{
"id": "46299262185816041",
"status": "PAYER_ACTION_REQUIRED",
"payment_source": {
"paypal": {}
},
"links": [{
"href": "https://api-m.sandbox.paypal.com/v2/checkout/orders/46299262185816041",
"rel": "self",
"method": "GET",
},
{
"href": "https://www.sandbox.paypal.com/checkoutnow?token=46299262185816041",
"rel": "approve",
"method": "GET",
}
]
}Note the status of the response. Some payment sources need payer approval before payment. If so, return the id back to your client to redirect the payer to a flow where they approve the payment method.
After the payer approves, your server should call the following APIs:
intent passed was CAPTURE.intent passed was AUTHORIZE.curl -v -X POST https://api-m.sandbox.paypal.com/v2/checkout/orders/5O190127TN364715T/authorize \
-H "Content-Type: application/json"\
-H "Authorization: Bearer ACCESS-TOKEN"\
-d '{}'curl -v -X POST https://api-m.sandbox.paypal.com/v2/checkout/orders/5O190127TN364715T/capture \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ACCESS-TOKEN" \
-d '{}'The HTTP response codes HTTP 2xx or HTTP 200 are returned for a successful request.
The capture is successful if the purchase_units[0].payments.captures.status is COMPLETED. You can confirm with the payer that the payment has been captured.
{
"id": "9YF83379T2523751N",
"status": "COMPLETED",
"payment_source": {
"paypal": {
"email_address": "[email protected]",
"account_id": "AJM9JTWQJCFTA",
"name": {
"given_name": "Firstname",
"surname": "Lastname"
},
"address": {
"country_code": "US"
},
"attributes": {
"vault": {
"id": "nkq2y9g",
"customer": {
"id": "ROaPMoZUaV"
},
"status": "VAULTED",
"links": [{
"href": "https://api-m.sandbox.paypal.com/v3/vault/payment-tokens/64n9c42",
"rel": "self",
"method": "GET"
},
{
"href": "https://api-m.sandbox.paypal.com/v3/vault/payment-tokens/64n9c42",
"rel": "delete",
"method": "DELETE"
},
{
"href": "https://api-m.sandbox.paypal.com/v2/checkout/orders/9YF83379T2523751N",
"rel": "up",
"method": "GET"
}
]
}
}
}
},
"purchase_units": [{
"reference_id": "default",
"shipping": {
"name": {
"full_name": "Firstname Lastname"
},
"address": {
"address_line_1": "1 Main St",
"admin_area_2": "San Jose",
"admin_area_1": "CA",
"postal_code": "95131",
"country_code": "US"
}
},
"payments": {
"captures": [{
"id": "9LY87817BF120310A",
"status": "COMPLETED",
"amount": {
"currency_code": "USD",
"value": "100.00"
},
"final_capture": true,
"seller_protection": {
"status": "ELIGIBLE",
"dispute_categories": [
"ITEM_NOT_RECEIVED",
"UNAUTHORIZED_TRANSACTION"
]
},
"seller_receivable_breakdown": {
"gross_amount": {
"currency_code": "USD",
"value": "100.00"
},
"paypal_fee": {
"currency_code": "USD",
"value": "3.98"
},
"net_amount": {
"currency_code": "USD",
"value": "96.02"
}
},
"links": [{
"href": "https://api-m.sandbox.paypal.com/v2/payments/captures/9LY87817BF120310A",
"rel": "self",
"method": "GET"
},
{
"href": "https://api-m.sandbox.paypal.com/v2/payments/captures/9LY87817BF120310A/refund",
"rel": "refund",
"method": "POST"
},
{
"href": "https://api-m.sandbox.paypal.com/v2/checkout/orders/9YF83379T2523751N",
"rel": "up",
"method": "GET"
}
],
"create_time": "2022-08-12T18:16:42Z",
"update_time": "2022-08-12T18:16:42Z"
}]
}
}],
"payer": {
"name": {
"given_name": "Firstname",
"surname": "Lastname"
},
"email_address": "[email protected]",
"payer_id": "AJM9JTWQJCFTA",
"address": {
"country_code": "US"
}
},
"links": [{
"href": "https://api-m.sandbox.paypal.com/v2/checkout/orders/9YF83379T2523751N",
"rel": "self",
"method": "GET"
}]
}In the response from the Authorize or Capture request, the Orders v2 API interacts with the Vault v3 API. The Vault v3 API allows a PayPal Wallet to be saved. The response from the Orders v2 API contains the:
vault.id.vault.status.Saving a payment source doesn't require the payer to be present after the payment has been authorized or captured. To keep checkout times as short as possible for payers, the Orders API returns a response as soon as a payment is captured.
Payment may be authorized or captured and a successful response returned from the Orders API without the provided payment_source being saved. In this scenario, the response returns the attributes.vault.status as "APPROVED", instead of "VAULTED".
An example of the attributes object from this scenario is included in the following sample
"attributes": {
"vault": {
"status": "APPROVED",
"links": [
{
"href": "https://api-m.sandbox.paypal.com/v2/checkout/orders/5O190127TN364715T",
"rel": "up",
"method": "GET"
}
]
}
}You can configure and subscribe to the VAULT.PAYMENT-TOKEN.CREATED webhook, which is generated when saving payment methods with the Orders API.
You'll receive a vault_id when an APPROVED status is returned.
| Event | Trigger | Payment methods |
|---|---|---|
VAULT.PAYMENT-TOKEN.CREATED | A payment token is created to save a payment method. | Cards and PayPal |
VAULT.PAYMENT-TOKEN.DELETED | A payment token is deleted. The payer's payment method is no longer saved to the PayPal vault. | Cards and PayPal |
VAULT.PAYMENT-TOKEN.DELETION-INITIATED | A request to delete a payment token has been submitted to the Payment Method Tokens API. | PayPal |
For more information on webhooks, see webhooks.
Follow Use payment method token with checkout for subsequent or recurring transactions.