Create a setup token
POST {{base_url}}/v3/vault/setup-tokens
Creates a Setup Token from the given payment source and adds it to the Vault of the associated customer.
Request Body
{"payment_source"=>{"card"=>{"number"=>"{{card_number}}", "expiry"=>"2027-02", "name"=>"John Doe", "billing_address"=>{"address_line_1"=>"2211 N First Street", "address_line_2"=>"17.3.160", "admin_area_1"=>"CA", "admin_area_2"=>"San Jose", "postal_code"=>"95131", "country_code"=>"US"}}}}
HEADERS
| Key | Datatype | Required | Description |
| Content-Type
| string | | The Content-Type header field is used to specify the nature of the data in the body of an entity. PayPal REST APIs support application/json. |
| PayPal-Request-Id
| string | | The server stores keys for 6 hours. The API callers can request the times to up to 72 hours by speaking to their Account Manager. |
| PayPal-Auth-Assertion
| string | | An API client-provided JSON Web Token (JWT) assertion that identifies the merchant. To use this header, you must get consent to act on behalf of a merchant.
|
RESPONSES
status: Created
{"id":"85186205RL0794831","customer":{"id":"fTfQyTnmnB"},"status":"PAYER_ACTION_REQUIRED","payment_source":{"venmo":{"description":"Description for Venmo to be shown to Venmo payer","usage_pattern":"IMMEDIATE","shipping":{"name":{"full_name":"John Doe"},"address":{"address_line_1":"2211 N First Street","address_line_2":"Building 17","admin_area_2":"San Jose","admin_area_1":"CA","postal_code":"95131","country_code":"US"}},"permit_multiple_payment_tokens":false,"usage_type":"MERCHANT","customer_type":"CONSUMER"}},"links":[{"href":"https://api.sandbox.paypal.com/v3/vault/setup-tokens/85186205RL0794831","rel":"self","method":"GET","encType":"application/json"},{"href":"https://sandbox.paypal.com/agreements/approve?approval_session_id=85186205RL0794831","rel":"approve","method":"GET","encType":"application/json"}]}