POST /v1/customers/{customer}/cards
When you create a new credit card, you must specify a customer or recipient on which to create it.
If the card’s owner has no default card, then the new card will become the default.
However, if the owner already has a default, then it will not change.
To change the default, you should update the customer to have a new default_source
.
Servers
- https://api.stripe.com/
Path parameters
Name | Type | Required | Description |
---|---|---|---|
customer |
String | Yes |
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/x-www-form-urlencoded" |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
source |
String | No |
Please refer to full documentation instead. |
alipay_account |
String | No |
A token returned by Stripe.js representing the user’s Alipay account details. |
expand[] |
Array | No |
Specifies which fields in the response should be expanded. |
metadata |
Object | No |
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to |
bank_account |
No |
Either a token, like the ones returned by Stripe.js, or a dictionary containing a user's bank account details. |
|
card |
No |
A token, like the ones returned by Stripe.js. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.