Add or Update Default Funding Method

🚧

Availability Notice:

This API will be available starting November 26, 2025. Requests before that date may be rejected.


Endpoint:
POST https://sandbox-api.veem.com/veem/v1.2/funding-methods/account/{accountId}/default


Description

Creates or updates the default funding methods (credit and/or debit) for the authenticated account.

If a funding method is provided, the API validates that:

  • The funding method exists for the account.
  • The ID and type match the existing record.
  • The funding method status is Active.
  • If credit, the funding method must be valid to receive funds.
  • If debit or billing, the funding method must be valid to send funds.

If all validations pass, the preference is saved for the account.


Headers

NameTypeRequiredDescription
AuthorizationstringBearer token (OAuth 2.0)
X-Request-IdstringUnique request identifier for journaling and tracking
Content-TypestringMust be application/json

Request Param

FieldTypeRequiredDescription
accountIdlongThe account ID where the preference will be applied

Request Body

FieldTypeRequiredDescription
defaultCreditMethodobjectDefault credit method definition (validated and updated if present)
defaultDebitMethodobjectDefault debit method definition (validated and updated if present)
defaultBillingMethodobjectDefault billing method definition (validated and updated if present)
defaultCreditMethod.idlong✅ if defaultCreditMethod presentID of the credit funding method
defaultCreditMethod.typestring✅ if defaultCreditMethod presentType of credit funding method — one of: Bank, Card, Wallet, VirtualCard, VirtualBank
defaultDebitMethod.idlong✅ if defaultDebitMethod presentID of the debit funding method
defaultDebitMethod.typestring✅ if defaultDebitMethod presentType of debit funding method — one of: Bank, Card, Wallet, VirtualCard, VirtualBank
defaultBillingMethod.idlong✅ if defaultBillingMethod presentID of the billing funding method
defaultBillingMethod.typestring✅ if defaultBillingMethod presentType of billing funding method — one of: Bank, Card, Wallet, VirtualCard, VirtualBank

Example Request

{
  "defaultCreditMethod": {
    "id": 123456,
    "type": "Card"
  },
  "defaultDebitMethod": {
    "id": 123789,
    "type": "Bank"
  },
  "defaultBillingMethod": {
    "id": 456789,
    "type": "VirtualBank"
  }
}

Responses

✅ 200 OK Returns the created or updated funding method preference.

{
	"accountId": 123741,
  "defaultCreditMethod": {
    "id": 123456,
    "type": "Card"
  },
  "defaultDebitMethod": {
    "id": 123789,
    "type": "Bank"
  },
  "defaultBillingMethod": {
    "id": 456789,
    "type": "VirtualBank"
  }
}

Error Responses

HTTP CodeErrorDescription
400BadRequestValidation failed (method not found, mismatched type, or not Active)
401UnauthorizedInvalid or expired authentication token
403ForbiddenCaller does not have permission to modify funding methods
404NotFoundFunding method or account not found
500InternalServerErrorUnexpected server-side error

Example Validation Error

{
  "errorCode": "INVALID_FUNDING_METHOD",
  "message": "defaultDebitMethod (id 54848) is not Active; status=Inactive"
}

Notes

  • You can send either defaultCreditMethod, defaultDebitMethod, or both.
  • Validation is performed independently for each provided method.
  • The funding method must belong to the authenticated account.
  • The operation is idempotent — resubmitting the same data will not create duplicates.
  • If no changes are detected, the API will return the existing preference.

Example cURL

curl -X POST "https://sandbox-api.veem.com/veem/v1.2/funding-methods/account/:accountId/default" \
  -H "Authorization: Bearer <access_token>" \
  -H "X-Request-Id: 123e4567-e89b-12d3-a456-426614174000" \
  -H "Content-Type: application/json" \
  -d '{
        "defaultCreditMethod": {
          "id": 54864,
          "type": "Card"
        },
        "defaultDebitMethod": {
          "id": 54848,
          "type": "Card"
        },
        "defaultBillingMethod": {
          "id": 456789,
          "type": "VirtualBank"
        }
      }'