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
| Name | Type | Required | Description |
|---|---|---|---|
Authorization | string | ✅ | Bearer token (OAuth 2.0) |
X-Request-Id | string | ✅ | Unique request identifier for journaling and tracking |
Content-Type | string | ✅ | Must be application/json |
Request Param
| Field | Type | Required | Description |
|---|---|---|---|
accountId | long | ✅ | The account ID where the preference will be applied |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
defaultCreditMethod | object | ❌ | Default credit method definition (validated and updated if present) |
defaultDebitMethod | object | ❌ | Default debit method definition (validated and updated if present) |
defaultBillingMethod | object | ❌ | Default billing method definition (validated and updated if present) |
defaultCreditMethod.id | long | ✅ if defaultCreditMethod present | ID of the credit funding method |
defaultCreditMethod.type | string | ✅ if defaultCreditMethod present | Type of credit funding method — one of: Bank, Card, Wallet, VirtualCard, VirtualBank |
defaultDebitMethod.id | long | ✅ if defaultDebitMethod present | ID of the debit funding method |
defaultDebitMethod.type | string | ✅ if defaultDebitMethod present | Type of debit funding method — one of: Bank, Card, Wallet, VirtualCard, VirtualBank |
defaultBillingMethod.id | long | ✅ if defaultBillingMethod present | ID of the billing funding method |
defaultBillingMethod.type | string | ✅ if defaultBillingMethod present | Type 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 Code | Error | Description |
|---|---|---|
| 400 | BadRequest | Validation failed (method not found, mismatched type, or not Active) |
| 401 | Unauthorized | Invalid or expired authentication token |
| 403 | Forbidden | Caller does not have permission to modify funding methods |
| 404 | NotFound | Funding method or account not found |
| 500 | InternalServerError | Unexpected 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"
}
}'Updated 4 days ago
