Virtual Card
Overview
The Virtual Cards API allows you to create and manage virtual cards for your customers. Before using any card functionality, customers must first complete KYC activation.
Base URL
Production base url : https://api.yativo.com/api/v1
Test base url : https://smtp.yativo.com/api/v1Authentication & Headers
All non-GET requests require an Idempotency-Key header to ensure request uniqueness:
Idempotency-Key: unique-request-identifier
Content-Type: application/jsonActivate Customer for Virtual Cards
Before creating virtual cards, customers must complete KYC verification.
Endpoint: POST /customer/virtual/cards/activate
Request Body:
{
"customer_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"customer_address": {
"city": "New York",
"state": "New York",
"zipcode": "10001",
"street": "123 Main Street Plaza",
"country": "USA",
"number": "25"
},
"customer_idFront": "https://example.com/path/to/id-front.png",
"customer_idNumber": "A12345678",
"date_of_birth": "01-01-1990",
"user_photo": "https://example.com/path/to/photo.png"
}Parameters:
customer_id(string, required): Unique customer identifiercustomer_address(object, required): Customer's address informationcity(string): City namestate(string): State/provincezipcode(string): Postal/ZIP codestreet(string): Street addresscountry(string): Country namenumber(string): House/building number
customer_idFront(string, required): URL to front of ID documentcustomer_idNumber(string, required): ID document numberdate_of_birth(string, required): Date of birth in DD-MM-YYYY formatuser_photo(string, required): URL to customer photo
Create Virtual Card
Create a new virtual card for an activated customer.
Endpoint: POST /customer/virtual/cards/create
Request Body:
{
"amount": 300,
"customer_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}Parameters:
amount(integer, required): Initial card amount in cents (multiples of 100). Minimum $3 fee appliescustomer_id(string, required): Unique customer identifier
Response:
{
"status": "success",
"status_code": 200,
"message": "Request successful",
"data": {
"card_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"customer_email": "[email protected]",
"customer_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"card_brand": "visa",
"card_type": "virtual"
}
}Top Up Card
Add funds to an existing virtual card from the customer's wallet balance.
Endpoint: POST /customer/virtual/cards/topup
Request Body:
{
"customer_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"cardId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"amount": 1000
}Parameters:
customer_id(string, required): Unique customer identifiercardId(string, required): Card identifier to top upamount(integer, required): Top-up amount in cents (multiples of 100)
Get Card Details
Retrieve detailed information for a specific card.
Endpoint: GET /customer/virtual/cards/get/{{cardId}}
Response:
{
"status": "success",
"status_code": 200,
"message": "Request successful",
"data": {
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"balance": 300,
"cardNumber": "4767xxxxxxxxxxxx",
"last4": "xxxx",
"cardName": "John Doe",
"cardType": "virtual",
"cardBrand": "visa",
"cvv2": "xxx",
"expiry": "2028-06-10T00:00:00",
"valid": "06/2028",
"billingAddress": {
"city": "Miami",
"state": "Florida",
"street": "3401 N. Miami, Ave. Ste 230",
"country": "United States",
"zipCode": "33127",
"countryCode": "US"
},
"airlinePaymentEnabled": "disabled"
}
}Get Card Transactions
Retrieve transaction history for a specific card.
Endpoint: GET /customer/virtual/cards/transactions/{{cardId}}
Response:
{
"status": "success",
"status_code": 200,
"message": "Request successful",
"data": [
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"createdAt": "2025-06-10T13:54:11.594Z",
"updatedAt": "2025-06-10T13:54:11.730Z",
"amount": "3",
"centAmount": "300",
"cardBalanceAfter": "300",
"type": "credit",
"method": "topup",
"narrative": "Top-up card",
"status": "success",
"currency": "usd",
"reference": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"transactionType": null,
"cardId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"authorizationTransactionId": null,
"settlementTransactionId": null
}
]
}Transaction Object Fields:
id: Unique transaction identifiercreatedAt: Transaction creation timestampupdatedAt: Last update timestampamount: Transaction amount in dollarscentAmount: Transaction amount in centscardBalanceAfter: Card balance after transactiontype: Transaction type (credit/debit)method: Transaction method (topup/purchase/etc.)narrative: Human-readable descriptionstatus: Transaction statuscurrency: Transaction currency (usd)reference: Transaction reference number
Security Considerations
Always use HTTPS for API requests
Store card details securely and comply with PCI DSS requirements
Implement proper authentication and authorization
Use idempotency keys to prevent duplicate transactions