Skip to content

Sets a default payment method

Request

POST {{baseURL}}/v2/payment-methods/{{paymentMethodId}}/set-default

This endpoint set the specified payment method as the default payment method.

Only one payment method can be set as the default. When set, the previous default payment method, if there was one, is changed to not being the default.

Only customer-linked payment methods can be made default; CustomerId is therefore required. Orphan PMs (no linked customer) have no concept of default and cannot reach this endpoint without a customer scope.

This endpoint requires a merchant API token. A partner API token will result in a permissions error including possibly a 403 response.

See Also:
To list payment methods, see GET /v2/payment-methods.
To retrieve a payment method by ID, see GET /v2/payment-methods/{{paymentMethodId}}.
To update a payment method, see PATCH /v2/payment-methods/{{paymentMethodId}}.
To delete a payment method, see DELETE /v2/payment-methods/{{paymentMethodId}}.

Security
Bearer
Path
paymentMethodIdstring, (uuid)required

Specifies the payment method identifier to set as default.

Example: 1a4f15c9-f39c-49f1-aad5-04e0e72804ad

Example:1a4f15c9-f39c-49f1-aad5-04e0e72804ad
Query
customerIdstring, (uuid)required

Specifies a customer's identifier.

Example: c4b210e9-be39-4ebc-8195-0c422de87f90

Example:customerId=c4b210e9-be39-4ebc-8195-0c422de87f90
curl -i -X POST \
  'https://sandbox.api.flute.com/v2/payment-methods/1a4f15c9-f39c-49f1-aad5-04e0e72804ad/set-default?customerId=c4b210e9-be39-4ebc-8195-0c422de87f90' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

OK. The payment method was set as the default.

Response
No content