POST /v1/payment_methods/{payment_method}

Updates a PaymentMethod object. A PaymentMethod must be attached to a customer to be updated.

Servers

Path parameters

Name Type Required Description
payment_method 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
payto Object No

If this is a payto PaymentMethod, this hash contains details about the PayTo payment method.

payto.pay_id String No
payto.account_number String No
payto.bsb_number String No
expand[] Array No

Specifies which fields in the response should be expanded.

allow_redisplay String No

This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to unspecified.

Valid values:

  • "limited"
  • "unspecified"
  • "always"
metadata 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 metadata.

card Object No

If this is a card PaymentMethod, this hash contains the user's card details.

card.exp_year Integer No
card.networks Object No
card.networks.preferred String No

Valid values:

  • ""
  • "visa"
  • "cartes_bancaires"
  • "mastercard"
card.exp_month Integer No
us_bank_account Object No

If this is an us_bank_account PaymentMethod, this hash contains details about the US bank account payment method.

us_bank_account.account_holder_type String No

Valid values:

  • "company"
  • "individual"
us_bank_account.account_type String No

Valid values:

  • "checking"
  • "savings"
billing_details Object No

Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.

billing_details.email No
billing_details.name No
billing_details.tax_id String No
billing_details.phone No
billing_details.address No

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. 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.
  3. Click Test request to test run your request to the API and see the API's response.