On this page
No Headings
Last updated: June 18, 2026
The Payment Method Token API saves payment methods so payers don't have to enter details for future transactions. After payers save a payment method, payers can check out faster. You can also charge payers for subscriptions using payment methods such as PayPal, Venmo, cards, and Apple Pay.
You can use billing agreements you created with the Billing API to charge your customers. Convert billing agreements to payment tokens to use billing agreements with the Payment Method Tokens API.
When you convert billing agreements to payment tokens, you can use a single integration with the Payment Method Tokens API to manage PayPal, cards, Venmo, and Apple Pay, depending on market availability.
This server-side integration uses the Payment Method Tokens REST API.
Complete the steps in Get started to get the following sandbox account information from the Developer Dashboard:
Your account must already be configured for billing agreements to set up a reference transaction. Contact your account manager for details.
/v3/vault/payment-tokens endpoint.Note: For a payer with multiple billing agreements, pass the PayPal-generated customer ID returned from the first API response in all subsequent API request payloads. This links the payer's PayPal-generated customer ID to their multiple payment tokens.
Use existing billing agreement IDs to generate a payment token using payment method endpoint for a given payer. Copy the sample request code to generate a payment token:
curl -v -k -X POST 'https://api-m.sandbox.paypal.com/v3/vault/payment-tokens' \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ACCESS-TOKEN" \
-H "PayPal-Request-Id: REQUEST-ID" \
-d '{
"payment_source": {
"token": {
"type": "BILLING_AGREEMENT",
"id": "B-7LT926395E2643345"
}
}
}'ACCESS-TOKEN to your sandbox access token.REQUEST-ID to a unique alphanumeric set of characters such as a time stamp.BILLING_AGREEMENT.{
"id": "0rjhvf82",
"customer": {
"id": "customer_12345"
},
"payment_source": {
"paypal": {
"description": "Description for PayPal to be shown to PayPal payer",
"usage_type": "MERCHANT",
"customer_type": "CONSUMER",
"email_address": "[email protected]",
"payer_id": "B2Y3KG6U5J3NC",
"name": {
"given_name": "Firstname",
"surname": "Lastname",
"full_name": "Firstname Lastname"
},
"tenant": "PAYPAL"
}
},
"links": [
{
"href": "https://api-m.sandbox.paypal.com/v3/vault/payment-tokens/0rjhvf82",
"rel": "self",
"method": "GET",
"encType": "application/json"
},
{
"href": "https://api-m.sandbox.paypal.com/v3/vault/payment-tokens/0rjhvf82",
"rel": "delete",
"method": "DELETE",
"encType": "application/json"
}
]
}A successful request returns the following:
200 or 201. Returns 200 for an idempotent request.id field.| Rel | Method | Description |
|---|---|---|
self | GET | Make a GET request to this link to retrieve data about the saved payment method. |
delete | DELETE | Make a DELETE request to delete the payment token. |
| Issue | Message | Description |
|---|---|---|
EXACTLY_ONE_FIELD_REQUIRED | Exactly one payment source is required. | The request is not well-formed, is syntactically incorrect, or violates schema. |
INACTIVE_BILLING_AGREEMENT | Billing Agreement is not active. | The billing agreement is not active state can't be saved or used for purchase. |
INTERNAL_SERVER_ERROR | A system or application error occurred. Although the client appears to provide a correct request, something unexpected occurred on the server. | An internal server error occurred. |
MALFORMED_REQUEST_JSON | The request JSON is not well formed. | The request is not well-formed, is syntactically incorrect, or violates schema. |
MISSING_REQUIRED_PARAMETER | A required field or parameter is missing. | The request is not well-formed, is syntactically incorrect, or violates schema. |
NOT_ENABLED_TO_VAULT_PAYMENT_SOURCE | The API caller or the merchant on whose behalf the API call is initiated is not allowed to vault the given source. Please contact PayPal customer support for assistance. | Authorization failed due to insufficient permissions. |
PAYPAL_REQUEST_ID_PREVIOUSLY_USED | The PayPal-Request-ID has already been used for another request. | The requested action could not be performed, is semantically incorrect, or failed business validation. |
PERMISSION_DENIED | You do not have permission to access or perform operations on this resource. | Authorization failed due to insufficient permissions. |
TOKEN_NOT_FOUND | The specified token ID does not exist. | The requested resource ID was not found. |
TOKEN_PROVIDED_NOT_SUPPORTED | 422 unprocessable entity | The token provided is not currently supported. |
| Event | Trigger | Payment methods |
|---|---|---|
VAULT.PAYMENT-TOKEN.CREATED | A payment method token is created to save a payment method. | PayPal |