Skip to content

Create Card ​

Create a new virtual card with automatic wallet deduction

Endpoint: POST https://api.uncash.io/api/v1/cards

Body Parameters ​

ParameterTypeRequiredDescription
bin_idstringYesBIN identifier for the card (get from /api/v1/bins)
namestringYesCard nickname (1-255 characters)
planIdintegerYesCard plan ID (get from /api/v1/card-plans)
coupon_idstringNoOptional coupon ID for discounts

Response ​

Success Response ​

FieldTypeDescription
successbooleanIndicates if the card was created successfully
messagestringSuccess message
timestampstringISO 8601 timestamp

Data Object ​

FieldTypeDescription
idstringDatabase card ID (UUID)
categorystringCard category ("Wallet" or "Online")
statusstringCard status ("active")
balancenumberInitial card balance
addressobjectBilling address object

Address Object ​

FieldTypeDescription
citystringCity name
line1stringAddress line 1
line2string | nullAddress line 2 (optional)
statestringState/Province
countrystringCountry code
postalCodestringPostal/ZIP code

Request Example ​

bash
curl -X POST https://api.uncash.io/api/v1/cards \
  -H "Authorization: Bearer uc_your_api_token_here" \
  -H "Content-Type: application/json" \
  -d '{
    "bin_id": "bin-id",
    "name": "My Business Card",
    "planId": 1
  }'
javascript
const response = await fetch('https://api.uncash.io/api/v1/cards', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer uc_your_api_token_here',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    bin_id: "bin-id",
    name: "My Business Card",
    planId: 1
  })
});

const data = await response.json();
python
import requests

url = "https://api.uncash.io/api/v1/cards"
headers = {
    "Authorization": "Bearer uc_your_api_token_here",
    "Content-Type": "application/json"
}
data = {
    "bin_id": "bin-id",
    "name": "My Business Card",
    "planId": 1
}

response = requests.post(url, headers=headers, json=data)
result = response.json()

Response Example ​

json
{
  "success": true,
  "message": "Card created successfully",
  "data": {
    "id": "card-id",
    "category": "Wallet",
    "status": "active",
    "balance": 10000,
    "address": {
      "city": "xx",
      "line1": "xx",
      "line2": null,
      "state": "xx",
      "country": "xx",
      "postalCode": "xx"
    }
  },
  "timestamp": "2025-11-22T08:27:06.832Z"
}

Notes ​

Wallet Deduction: The card creation fee is automatically deducted from your wallet balance. Ensure you have sufficient funds before creating a card.

Error Responses ​

Insufficient Balance ​

json
{
  "success": false,
  "message": "Insufficient balance. Required: 100.00",
  "timestamp": "2025-11-22T10:00:00.000Z"
}

Invalid BIN ID ​

json
{
  "success": false,
  "message": "Invalid BIN ID or BIN is disabled",
  "timestamp": "2025-11-22T10:00:00.000Z"
}

Validation Error ​

json
{
  "success": false,
  "message": "Invalid input data",
  "error": [
    {
      "code": "too_small",
      "minimum": 1,
      "type": "string",
      "inclusive": true,
      "exact": false,
      "message": "Card name is required",
      "path": ["name"]
    }
  ],
  "timestamp": "2025-11-22T10:00:00.000Z"
}

UnCash API Documentation