Payment Method Tokens
The Payment Method Tokens API saves payment methods so payers don't have to enter details for future transactions. Payers can check out faster or pay without…
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
The Payment Method Tokens API saves payment methods so payers don't have to enter details for future transactions. Payers can check out faster or pay without being present after they agree to save a payment method. The API associates a payment method with a temporary setup token. Pass the setup token to the API to exchange the setup token for a permanent token. The permanent token represents a payment method that's saved to the vault. This token can be used repeatedly for checkout or recurring transactions such as subscriptions.
Endpoints 6
payment-tokens
- GETList all payment tokens
/v3/vault/payment-tokens?customer_id=string&page_size=5&page=1&total_required=falseReturns all payment tokens for a customer. - POSTCreate payment token for a given payment source
/v3/vault/payment-tokensCreates a Payment Token from the given payment source and adds it to the Vault of the associated customer. - GETRetrieve a payment token
/v3/vault/payment-tokens/:idReturns a readable representation of vaulted payment source associated with the payment token id. - DELETEDelete payment token
/v3/vault/payment-tokens/:idDelete the payment token associated with the payment token id.
setup-tokens
- POSTCreate a setup token
/v3/vault/setup-tokensCreates a Setup Token from the given payment source and adds it to the Vault of the associated customer. - GETRetrieve a setup token
/v3/vault/setup-tokens/:idReturns a readable representation of temporarily vaulted payment source associated with the setup token id.
API details
- Base URL
https://api-m.sandbox.paypal.comhttps://api-m.paypal.com- Authentication
- OAuth 2.0 (client credentials flow) with 4 scopes
- Operations
- 6 operations on 4 pathsGET 3POST 2DELETE 1
- Main resources
- payment-tokens 4setup-tokens 2
- Response formats
application/json- Description format
- OpenAPI 3.0.3, API version
3.4 - Links
- Documentation · OpenAPI document
- Listed from
- PayPal's published OpenAPI description (paypal/paypal-rest-api-specifications) (Apache-2.0)
How to test the Payment Method Tokens in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the Payment Method Tokens collection, without the publisher's secrets.
- Add your credentialsThis API uses OAuth 2.0 (client credentials flow) with 4 scopes. Add yours in the collection's variables or an environment; the requests already reference it.
- Send a requestPick an endpoint, for example “List all payment tokens” (GET /v3/vault/payment-tokens?customer_id=string&page_size=5&page=1&total_required=false), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the Payment Method Tokens?
The Payment Method Tokens API saves payment methods so payers don't have to enter details for future transactions. Payers can check out faster or pay without… It is listed under Payments and has 6 endpoints.
Who publishes the Payment Method Tokens?
It is listed from PayPal's public API description (an OpenAPI document), not published by PayPal on Swastik Codes. Anyone who controls paypal.com can claim the profile by adding a DNS TXT record.
What is the base URL of the Payment Method Tokens?
Its description lists 2 base URLs: https://api-m.sandbox.paypal.com, https://api-m.paypal.com. The first is the usual one; the others are typically sandbox or regional servers.
How do I authenticate with the Payment Method Tokens?
With OAuth 2.0 (client credentials flow) with 4 scopes.
How many endpoints does the Payment Method Tokens have?
6 operations on 4 paths (3 GET, 2 POST, 1 DELETE). The largest groups are payment-tokens, setup-tokens.
Is forking the Payment Method Tokens free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.