# Update a billing profile's credit card

> [!WARNING] Warning: Experimental API
> Please note that the Dashboard API is an experimental, prerelease API. This API method is considered unstable, and should be avoided in production environments and automations. Changes may occur at any time without warning.

## Body parameters

**`payment_intent_id`**

- Required
- Type: string

## Returns

Returns a resource object of type [per\_site\_pricing\_billing\_profile](https://www.datocms.com/docs/content-management-api/resources/per-site-pricing-billing-profile.md)

## Examples

###### Example Basic example

Code

```javascript
import { buildClient } from "@datocms/dashboard-client";

async function run() {
  const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });

  const perSitePricingBillingProfileId = "124";

  const perSitePricingBillingProfile =
    await client.perSitePricingBillingProfiles.updateCreditCard(
      perSitePricingBillingProfileId,
      { payment_intent_id: "" },
    );

  // Check the 'Returned output' tab for the result ☝️
  console.log(perSitePricingBillingProfile);
}

run();
```

Returned output

```javascript
{
  id: "124",
  billing_profile: {
    first_name: "Mark",
    last_name: "Smith",
    company: "Acme Inc.",
    card_last_4: "4242",
    next_billing_at: "2020-04-21T07:57:11.124Z",
    card_type: "visa",
    card_expiry_month: 4,
    card_expiry_year: 2024,
    address_line: "One Infinite Loop",
    city: "Cupertino",
    email: "invoices@acmeinc.com",
    country: "US",
    state: "California",
    zip: "95014",
    vat_number: null,
    defaulting: false,
    defaulting_since: null,
    credits: 0,
    cf_cod_fiscale: null,
    cf_cod_fiscale_partecipante_gruppo_iva: null,
    coupons: "COUPON-ABC",
    is_active: true,
    next_monthly_billing_at: "2020-04-21T07:57:11.124Z",
    next_yearly_billing_at: "2020-04-21T07:57:11.124Z",
    total_dues: 0,
  },
  active_subscriptions: [{ type: "site_subscription", id: "124" }],
}
```

## Related content in "Dashboard API"

- [Account](https://www.datocms.com/docs/dashboard-api/resources/account.md)
- [Session](https://www.datocms.com/docs/dashboard-api/resources/session.md)
- [OAuth application](https://www.datocms.com/docs/dashboard-api/resources/oauth-application.md)
- [Organization](https://www.datocms.com/docs/dashboard-api/resources/organization.md)
- [Organization role](https://www.datocms.com/docs/dashboard-api/resources/organization-role.md)
- [Organization invitation](https://www.datocms.com/docs/dashboard-api/resources/organization-invitation.md)
- [Organization membership](https://www.datocms.com/docs/dashboard-api/resources/organization-membership.md)
- [Organization mandate request](https://www.datocms.com/docs/dashboard-api/resources/organization-mandate-request.md)
- [Organization mandate](https://www.datocms.com/docs/dashboard-api/resources/organization-mandate.md)
- [Project](https://www.datocms.com/docs/dashboard-api/resources/site.md)
- [Site invitation](https://www.datocms.com/docs/dashboard-api/resources/site-invitation.md)
- [Site transfer request](https://www.datocms.com/docs/dashboard-api/resources/site-transfer.md)
- [Account subscription](https://www.datocms.com/docs/dashboard-api/resources/per-owner-pricing-subscription.md)
- [Plan](https://www.datocms.com/docs/dashboard-api/resources/per-owner-pricing-plan.md)
- [Billing profile](https://www.datocms.com/docs/dashboard-api/resources/per-owner-pricing-billing-profile.md)
- [Invoice](https://www.datocms.com/docs/dashboard-api/resources/invoice.md)
- [Billing profile](https://www.datocms.com/docs/dashboard-api/resources/resource-usage.md)
- [Daily Usage](https://www.datocms.com/docs/dashboard-api/resources/daily-usage.md)
- [Subscription limit](https://www.datocms.com/docs/dashboard-api/resources/subscription-limit.md)
- [Subscription feature](https://www.datocms.com/docs/dashboard-api/resources/subscription-feature.md)
- [Job result](https://www.datocms.com/docs/dashboard-api/resources/job-result.md)
- [Per-project subscription](https://www.datocms.com/docs/dashboard-api/resources/site-subscription.md)
- [Plan](https://www.datocms.com/docs/dashboard-api/resources/site-plan.md)
- [Billing profile](https://www.datocms.com/docs/dashboard-api/resources/per-site-pricing-billing-profile.md)
- [Retrieve all account's billing profiles](https://www.datocms.com/docs/dashboard-api/resources/per-site-pricing-billing-profile/instances.md)
- [Retrieve a billing profile](https://www.datocms.com/docs/dashboard-api/resources/per-site-pricing-billing-profile/self.md)
- [Update a billing profile's credit card](https://www.datocms.com/docs/dashboard-api/resources/per-site-pricing-billing-profile/update_credit_card.md)
- [Update a billing profile's billing information](https://www.datocms.com/docs/dashboard-api/resources/per-site-pricing-billing-profile/update_info.md)
- [Cancel subscription](https://www.datocms.com/docs/dashboard-api/resources/per-site-pricing-billing-profile/cancel_subscription.md)
- [Delete a billing profile](https://www.datocms.com/docs/dashboard-api/resources/per-site-pricing-billing-profile/destroy.md)