Prerequisites
To integrate with Secure Credential Services NFC Device Tokenization, you need:- A PayPal business account with a Client ID provisioned for NFC device tokenization
- OAuth 2.0 credentials (Client ID and Client Secret)
- A Token Requestor ID (TRID), a unique 11-digit identifier obtained via TRID onboarding with the PayPal integration team
- A device product configuration and sandbox test card data from your PayPal integration team
- Registered HTTPS webhook endpoint for receiving PP TSP event notifications
Note: Contact your PayPal integration team to obtain sandbox OAuth credentials, a device product configuration, and test card data before starting. Configure sandbox and production environments separately: never share credentials between environments.
API reference
Use the following base URLs and endpoints for all Payment Tokenization requests.Base URLs
All paths are prefixed/v1/payment-tokenization/. All PayPal REST API requests target one of two base URLs:
List of APIs
Authentication
All API calls require an OAuth 2.0 Bearer token obtained from the PayPal token endpoint.Steps for integration
Complete the following steps to onboard your TRID, register a device, and enroll a card for NFC tokenization. Depending on the card network’s response, enrollment follows either the Green Path, where the card is approved without additional verification, or the Yellow Path, which requires additional identity verification.1. Complete TRID onboarding
Before initiating any card enrollment, the device partner must complete Token Requestor ID (TRID) onboarding with PayPal TSP. The TRID is a unique 11-digit identifier required in all enrollment and payment credential API calls. Work with your PayPal integration team to complete TRID onboarding and obtain your PP TRID. Include it in thetoken_requestor.id field of all enrollment and payment credential API requests.
2. Register the device
Device registration is a one-time operation that establishes a trusted device identity with PayPal TSP. The returneddevice_id is used in all subsequent enrollment calls.
device_id. Store this securely and include it in all subsequent card enrollment requests. Do not re-register the same device.
- Sample request
- Sample response
3. Enroll a card (Green Path)
The Green Path is the standard provisioning flow where a card is approved for tokenization without additional user identity verification.3a. Create enrollment
After the user authenticates and selects a card, submit the enrollment request with encrypted card details:enrollment_id, a Terms & Conditions (T&C) ID, and an initial enrollment status of PENDING_TOKEN_CREATION.
- Sample request
- Sample response
3b. Retrieve and display T&C, card art, and other assets
- Sample request
- Sample response
3c. Tokenize the card
ACTIVE, PENDING_TOKEN_ACTIVATION, or PENDING_VERIFICATION_REQUIRED.
If the token is not immediately active, PayPal TSP will send a PAYMENT-TOKENIZATION.TOKEN-STATUS.CHANGED notification when the token is activated.
PayPal TSP sends a PAYMENT-TOKENIZATION.ENROLLMENT.CREATED webhook followed by a PAYMENT-TOKENIZATION.PAYMENT-CREDENTIAL.CREATED webhook once credentials are provisioned.
- Sample request
- Sample response: 201 Created
4. Enroll a card (Yellow Path)
The Yellow Path extends the Green Path when the card network requires additional identity verification (IDV) before activating the token.4a. Get verification methods
- Sample request
- Sample response: 200 OK
4b. Submit verification
- Sample request
- Sample response
4c. Validate OTP
HTTP 204 on success. After successful IDV, the card network sends a provisioning notification to PP TSP, which caches the credentials and sends a PAYMENT-TOKENIZATION.PAYMENT-CREDENTIAL.CREATED webhook.
- Sample request
- Sample response
5. Fetch payment credentials
After receiving thePAYMENT-TOKENIZATION.PAYMENT-CREDENTIAL.CREATED webhook, fetch and acknowledge payment credentials. Repeat this step whenever the device’s credential cache needs replenishing.
5a. Retrieve enrollment and credential details
Confirm the enrollment state and retrieve the payment credential metadata:enrollment_id and payment_credential_id from the webhook payload. Skip this step when replenishing an existing enrollment: you already have this context from the initial fetch.
5b. Fetch credentials
After receiving thePAYMENT-TOKENIZATION.PAYMENT-CREDENTIAL.CREATED webhook, fetch the full encrypted credentials:
credential_type based on what the device needs:
- Sample request
- Sample response
5c. Acknowledge receipt
After the device successfully receives and stores the full credentials, acknowledge receipt:- Sample request
- Sample response
6. Handle token lifecycle events
PP TSP automatically keeps tokens synchronized with underlying card state. Use the following endpoints for partner-initiated operations:
For issuer- or network-initiated changes such as card reissue, fraud replacement, or loss/theft, PP TSP processes the update and notifies Wallet Server via a
PAYMENT-TOKENIZATION.TOKEN-STATUS.CHANGED webhook. Call GET enrollment to retrieve the updated state and take appropriate action.
Closing an enrollment is irreversible: PP TSP sends a delete request to the card network and the token is permanently deactivated. Use suspend for temporary disabling.
7. Register and handle webhooks
PP TSP publishes signed webhook events to your registered HTTPS endpoint whenever a significant event occurs. Subscribe to all events below and returnHTTP 200 to acknowledge receipt. PP TSP retries delivery for unacknowledged events. Set up idempotent handlers to handle duplicate deliveries safely.
Note: PP TSP signs all webhook payloads. Always verify the signature before processing the event. Never process an event from an unverified source.Sample webhook payloads Each event is delivered to your registered endpoint in the following envelope:
PAYMENT-TOKENIZATION.ENROLLMENT.CREATED
PAYMENT-TOKENIZATION.PAYMENT-CREDENTIAL.CREATED
PAYMENT-TOKENIZATION.PAYMENT-CREDENTIAL.UPDATED
PAYMENT-TOKENIZATION.TOKEN-STATUS.CHANGED
PAYMENT-TOKENIZATION.TOKEN-METADATA.CHANGED
PAYMENT-TOKENIZATION.TRANSACTION.CREATED
Testing and go-live checklist
Complete the following in your sandbox environment before moving to production.- Credentials and setup: Obtain sandbox OAuth credentials, test device configuration, and test card data from the PayPal integration team. Confirm OAuth token acquisition and refresh logic.
- TRID onboarding: Complete TRID onboarding and verify your PP TRID is included in all enrollment and credential requests.
- Device registration: Confirm device registration returns a valid
device_idwith ACTIVE status. - Green Path enrollment: Complete an end-to-end Green Path enrollment with ACTIVE status confirmed.
- Yellow Path enrollment: Complete an end-to-end Yellow Path enrollment including all IDV steps.
- Payment credentials: Test both Full and Dynamic credential fetch and acknowledgment successfully.
- Lifecycle management: Test activate, suspend, and close operations via API.
- Webhooks: Verify all webhook event types are delivered and processed correctly in sandbox.
- Security: Confirm no raw PAN data appears in logs, responses, or stored records.
- Go-live: Contact your PayPal integration team to confirm production credentials, TRIDs, and webhook endpoints are configured separately from sandbox.