---
updatedAt: 2026-07-07T16:41:47.000Z
agentTools:
  projectIndex: https://docs.vopay.com/llms.txt
---

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

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.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "version": "2.0",
    "title": "Payment Methods",
    "description": "The Payment Methods API allows you to manage your payment methods.  You can add, delete, and set default payment methods.",
    "contact": {
      "name": "API Support",
      "email": "help@vopay.com"
    }
  },
  "paths": {
    "/credit-card/set-my-credit-card": {
      "post": {
        "description": "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.",
        "summary": "credit-card/set-my-credit-card",
        "tags": [
          "Credit Card Endpoints"
        ],
        "operationId": "CreditCardSetMyCreditCardPOST",
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "AccountID": {
                    "description": "Your account ID",
                    "type": "string"
                  },
                  "Key": {
                    "description": "API key for the account",
                    "type": "string"
                  },
                  "Signature": {
                    "description": "Hashed signature for the request",
                    "type": "string"
                  },
                  "CreditCardToken": {
                    "description": "Credit Card token",
                    "type": "string"
                  },
                  "ClientAccountID": {
                    "description": "Client Account ID",
                    "type": "string"
                  },
                  "SetAsDefault": {
                    "description": "Identify credit card as default crdit card",
                    "type": "boolean"
                  },
                  "Purpose": {
                    "description": "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",
                    "type": "string"
                  },
                  "RemovePurpose": {
                    "description": "Purpose to remove the default flag for on this credit card: Operational or Billing",
                    "type": "string"
                  }
                },
                "required": [
                  "AccountID",
                  "Key",
                  "Signature",
                  "CreditCardToken"
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Success": {
                      "type": "boolean",
                      "description": "True if the request was successful, false if it failed",
                      "example": true
                    },
                    "ErrorMessage": {
                      "type": "string",
                      "description": "Contains a description of the error if the request failed",
                      "example": ""
                    },
                    "CreditCardToken": {
                      "type": "string",
                      "description": "Credit Card token",
                      "example": "ACBDF-GAFSHD-AHBS-123456"
                    },
                    "IsDefault": {
                      "type": "boolean",
                      "description": "Is this the VoPay account holder's default credit card for the requested purpose",
                      "example": true
                    },
                    "Purpose": {
                      "type": "object",
                      "description": "Array serialized as a JSON object (JSON_FORCE_OBJECT): numeric string keys '0','1',... Empty {} when no items. Purposes assigned to this credit card",
                      "properties": {
                        "0": {
                          "type": "string",
                          "description": "Purpose name",
                          "example": "Operational"
                        }
                      },
                      "x-list-of": "inline",
                      "x-empty-when": "not expected in practice; this endpoint always assigns at least one purpose"
                    }
                  },
                  "required": [
                    "Success",
                    "ErrorMessage",
                    "CreditCardToken",
                    "IsDefault",
                    "Purpose"
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://earthnode-dev.vopay.com/api/v2"
    }
  ]
}
```