View as Markdown
API Spec (JSON)
API Spec (YAML)
Compact modeHides field descriptions and other prose for a more compact, scannable view of the API reference.Client CredentialsToken URLhttps://api-m.sandbox.paypal.com/v1/oauth2/tokenInheaderScopes
https://uri.paypal.com/services/vault/payment-tokens/readapplication/json
Setup Token creation with a instrument type optional financial instrument details and customer_id.
TypeScript Definitions
Use the request body type in TypeScript.
customerobject<customer>Optionalidstring<merchant_partner_customer_id>Optionalexpirystring<date_year_month>Optionalbrandenum<card_brand>Optionalbilling_addressobject<Portable Postal Address (Medium-Grained)>Optionaladmin_area_1stringOptionalcountry_codestring<country_code>RequiredNote: The country code for Great Britain isGBand notUKas used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.
verification_methodenum<card_verification_method>Optionalexperience_contextobject<card_experience_context>Optionallocalestring<language>Optionalvault_instructionenum<vault_instruction>OptionalDeprecateduser_actionenum<user_action>Optionalnetwork_transaction_referencenetwork_transaction_reference_requestOptionalpaypalobject<paypal_wallet_request>Optionalusage_patternenum<usage_pattern>Optionalemail_addressstring<email_address>Optionalphone_numberobject<phone>Optionalcountry_codestringRequirednational_numberstringRequiredtypeenumOptionaladdressobject<Portable Postal Address (Medium-Grained)>Optionaladmin_area_1stringOptionalcountry_codestring<country_code>RequiredNote: The country code for Great Britain isGBand notUKas used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.
permit_multiple_payment_tokensbooleanOptionalusage_typeenumOptionalcustomer_typeenumOptionalbilling_planobject<plan>Optionalbilling_cyclesobject<billing_cycle>[]Requiredtenure_typeenumRequiredpricing_schemeobject<pricing_scheme>Optionalpriceobject<money>Optionalcurrency_codestring<currency_code>RequiredvaluestringRequiredpricing_modelenumRequiredreload_threshold_amountobject<money>Optionalcurrency_codestring<currency_code>RequiredvaluestringRequiredfrequencyfrequencyOptionaltotal_cyclesintegerOptional1 and 999 for total_cycles). Regular billing cycles can be executed infinite times (value of 0 for total_cycles) or a finite number of times (value between 1 and 999 for total_cycles).start_datestring<date_no_time>Optionalproductproduct_overrideOptionalone_time_chargesobject<one_time_charges>Requiredsetup_feeobject<money>Optionalcurrency_codestring<currency_code>RequiredvaluestringRequiredshipping_amountobject<money>Optionalcurrency_codestring<currency_code>RequiredvaluestringRequiredtaxesobject<money>Optionalcurrency_codestring<currency_code>RequiredvaluestringRequiredproduct_priceobject<money>Optionalcurrency_codestring<currency_code>RequiredvaluestringRequiredtotal_amountobject<money>Requiredcurrency_codestring<currency_code>RequiredvaluestringRequiredexperience_contextobject<paypal_wallet_experience_context>Optionallocalestring<language>Optionalshipping_preferenceenumOptionalvault_instructionenum<vault_instruction>OptionalDeprecatedapp_switch_contextobject<app_switch_context>Optionalnative_appobject<native_app_context>OptionalNo fields are defined.
mobile_webobject<mobile_web_context>Optionaluser_actionenum<user_action>Optionalvenmoobject<venmo_request>Optionalusage_patternenum<usage_pattern>Optionalemail_addressstring<email_address>Optionalphone_numberobject<phone>Optionalcountry_codestringRequirednational_numberstringRequiredtypeenumOptionaladdressobject<Portable Postal Address (Medium-Grained)>Optionaladmin_area_1stringOptionalcountry_codestring<country_code>RequiredNote: The country code for Great Britain isGBand notUKas used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.
permit_multiple_payment_tokensbooleanOptionalusage_typeenumOptionalcustomer_typeenumOptionalexperience_contextobject<venmo_experience_context>Optionalshipping_preferenceenumOptionalvault_instructionenum<vault_instruction>OptionalDeprecateduser_actionenum<user_action>Optionalapple_payobject<apple_pay_request>Optionaltypeenum<card_type>Optionalbrandenum<card_brand>Optionalbilling_addressobject<Portable Postal Address (Medium-Grained)>Optionaladmin_area_1stringOptionalcountry_codestring<country_code>RequiredNote: The country code for Great Britain isGBand notUKas used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.
tokenobject<token_id_request>Optionalbankobject<bank_request>Optionalach_debitobject<ach_debit_request>Optionalverification_intentach_verification_intentOptionalverificationach_debit_verificationOptionalsepa_debitobject<sepa_debit_request>Optionalmandate_intentsepa_mandate_intentOptionalexperience_contextobject<sepa_debit_experience_context>Optionallocalestring<language>Optionalreturn_urlstring<url>Requiredcancel_urlstring<url>Requiredshopper_session_idshopper_session_idOptionalapplication/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v3/vault/setup-tokens" \ -H "Content-Type: application/json" \ -d '{ "payment_source": {} }'{ "id": "string", "customer": { "id": "string", "merchant_customer_id": "string" }, "status": "CREATED", "payment_source": { "card": { "name": "string", "last_digits": "stri", "brand": "VISA", "expiry": "strings", "billing_address": { "address_line_1": "string", "address_line_2": "string", "admin_area_2": "string", "admin_area_1": "string", "postal_code": "string", "country_code": "st", "id": "string" }, "verification_status": "VERIFIED", "verification": { "network_transaction_id": "string", "date": "stri", "network": "VISA", "time": "stringstringstringst", "amount": { "currency_code": "str", "value": "string" }, "processor_response": { "avs_code": "A", "cvv_code": "E" }, "three_d_secure": null }, "network_transaction_reference": { "id": "stringstr", "date": "stri", "network": "VISA", "acquirer_reference_number": "string", "time": "stringstringstringst" }, "authentication_result": { "three_d_secure": { "authentication_status": "Y", "enrollment_status": "Y", "authentication_id": "string" } }, "bin_details": { "bin": "string", "issuing_bank": "string", "bin_country_code": "st", "products": [ "string" ] }, "type": "CREDIT" }, "paypal": { "description": "string", "usage_pattern": "IMMEDIATE", "shipping": { "name": { "full_name": "string" }, "email_address": "string", "phone_number": { "country_code": "str", "national_number": "string" }, "type": "SHIPPING", "address": { "address_line_1": "string", "address_line_2": "string", "admin_area_2": "string", "admin_area_1": "string", "postal_code": "string", "country_code": "st" } }, "permit_multiple_payment_tokens": false, "usage_type": "MERCHANT", "customer_type": "CONSUMER", "email_address": "string", "payer_id": "stringstrings", "name": { "given_name": "string", "surname": "string" }, "phone": { "phone_type": "FAX", "phone_number": { "national_number": "string" } }, "address": { "address_line_1": "string", "address_line_2": "string", "admin_area_2": "string", "admin_area_1": "string", "postal_code": "string", "country_code": "st" }, "account_id": "stringstrings", "phone_number": { "country_code": "str", "national_number": "string", "extension_number": "string" } }, "venmo": { "description": "string", "usage_pattern": "IMMEDIATE", "shipping": { "name": { "full_name": "string" }, "email_address": "string", "phone_number": { "country_code": "str", "national_number": "string" }, "type": "SHIPPING", "address": { "address_line_1": "string", "address_line_2": "string", "admin_area_2": "string", "admin_area_1": "string", "postal_code": "string", "country_code": "st" } }, "permit_multiple_payment_tokens": false, "usage_type": "MERCHANT", "customer_type": "CONSUMER", "email_address": "string", "payer_id": "stringstrings", "name": { "given_name": "string", "surname": "string" }, "phone": { "phone_type": "FAX", "phone_number": { "national_number": "string" } }, "address": { "address_line_1": "string", "address_line_2": "string", "admin_area_2": "string", "admin_area_1": "string", "postal_code": "string", "country_code": "st" }, "user_name": "string" } }, "links": [ { "href": "string", "rel": "string", "method": "GET" } ]}