---
title: "Set default payment method"
method: POST
path: "/v1/billing-accounts/{id}/payment-methods/{paymentMethodId}/set-default"
tags: ["Billing"]
---

# Set default payment method

`POST /v1/billing-accounts/{id}/payment-methods/{paymentMethodId}/set-default`

## Request

- Base URL: `https://rest.compute.cudo.org`
- URL: `https://rest.compute.cudo.org/v1/billing-accounts/{id}/payment-methods/{paymentMethodId}/set-default`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/cudocompute/apis/cudo-compute-service/docs/v1/billing-accounts/:id/payment-methods/:paymentMethodId/set-default/post.ts> (a function with typed inputs; its response is checked against the schema)

Sets a payment method as the default for a billing account.

## Path parameters

- `id` string, required
- `paymentMethodId` string, required

## Response `200`

A successful response.

- SetBillingAccountDefaultPaymentMethodResponse
  - `id` string, required
  - `paymentMethodId` string, required

## Other responses

- `default`: An unexpected error response.

---

[API](https://skmtc.dev/cudocompute/apis/cudo-compute-service.md) - [All operations](https://skmtc.dev/cudocompute/apis/cudo-compute-service/llms.txt) - [OpenAPI document](https://skmtc.dev/cudocompute/apis/cudo-compute-service/revisions/93dc40dababc?raw)
