Skip to content

Updates a payment method

Request

PUT {{baseURL}}/pay-api/v1/customers/{{customerId}}/payment-methods/{{paymentMethodId}}

This endpoint updates the specified customer's payment method.

Only the payment method name may be changed with this endpoint. If a different payment method type is required, a new payment method identifier must be created.

Care must be taken to complete all the fields with the existing information.

See Also:
To list a customer's payment methods, see GET /pay-api/v1/customers/{customerId}/payment-methods.
To create an ACH payment method for a customer, see POST /pay-api/v1/customers/{customerId}/payment-methods/ach.
To create a card payment method for a customer, see POST /pay-api/v1/customers/{customerId}/payment-methods/cards.
To delete a customer's payment method, see DELETE /pay-api/v1/customers/{customerId}/payment-methods/{paymentMethodId}.

Security
Bearer
Path
customerIdstring, (uuid)required

Specifies the customerId, also known as the customer identifier.

Example:c4b210e9-be39-4ebc-8195-0c422de87f90
paymentMethodIdstring, (uuid)required

Specifies the payment method identifier.

Example:46e5de89-a9f0-4d79-9350-b612bfa3c5ee
Bodyapplication/json
namestring

Specifies the payment method name.

This is a free-formed name that is convenient for the merchant to recognize.

Example: Cafe Peppared

Example:"Cafe Peppared"
curl -i -X PUT \
  https://developer.flute.com/_mock/api-reference/pay-api/v1/customers/c4b210e9-be39-4ebc-8195-0c422de87f90/payment-methods/46e5de89-a9f0-4d79-9350-b612bfa3c5ee \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Payment_Method"
  }'

Responses

OK. The payment method was successfully updated.

Response
No content