---
title: "credit-card/set-my-credit-card"
method: POST
path: "/credit-card/set-my-credit-card"
tags: ["Credit Card Endpoints"]
---

# credit-card/set-my-credit-card

`POST /credit-card/set-my-credit-card`

## Request

- Base URL: `https://earthnode-dev.vopay.com/api/v2`
- URL: `https://earthnode-dev.vopay.com/api/v2/credit-card/set-my-credit-card`
- Auth: none declared

This endpoint allows you to identify a credit card as belonging to the VoPay account holder. Optionally, you can use this endpoint to identify a credit card as being the VoPay account holder's default credit card for one or more purposes (Operational, Billing). Note, a VoPay account can only have one default credit card per purpose.

## Request body `application/x-www-form-urlencoded`

- object
  - `AccountID` string, required: Your account ID
  - `Key` string, required: API key for the account
  - `Signature` string, required: Hashed signature for the request
  - `CreditCardToken` string, required: Credit Card token
  - `ClientAccountID` string: Client Account ID
  - `SetAsDefault` boolean: Identify credit card as default crdit card
  - `Purpose` string: Comma separated list of purposes to assign to the credit card: Operational, Billing. When omitted, defaults to 'Operational,Billing' — preserving the original behaviour where the single default card was used for both operational charges and account billing
  - `RemovePurpose` string: Purpose to remove the default flag for on this credit card: Operational or Billing

## Response `200`

- object
  - `Success` boolean, required: True if the request was successful, false if it failed
  - `ErrorMessage` string, required: Contains a description of the error if the request failed
  - `CreditCardToken` string, required: Credit Card token
  - `IsDefault` boolean, required: Is this the VoPay account holder's default credit card for the requested purpose
  - `Purpose` object, required: Array serialized as a JSON object (JSON_FORCE_OBJECT): numeric string keys '0','1',... Empty {} when no items. Purposes assigned to this credit card
    - `0` string: Purpose name

---

[API](https://skmtc.dev/vopay/apis/payment-methods.md) - [All operations](https://skmtc.dev/vopay/apis/payment-methods/llms.txt) - [OpenAPI document](https://skmtc.dev/vopay/apis/payment-methods/revisions/b566c8002410?raw)
