Create card
API Documentation: Create Virtual Card
Endpoint
POST {{baseUrl}}/customer/virtual/cards/create
Description
This endpoint allows you to create a new virtual card for a customer. The customer must already be registered and activated for virtual card services.
Card Issuing Fees
These fees apply to both MasterCard and Visa Virtual USD cards.
Headers
No specific headers are required for this endpoint, but typically, you might need to include authorization tokens or other headers as per your API's authentication requirements.
Request Body
The request body must include the following fields:
customer_id: (string) The unique identifier of the customer.
amount: (string) The initial amount to be loaded onto the virtual card.
Example Request Body
Response
The response will include the status of the request, a relevant message, and details of the newly created virtual card if the request is successful. If the request is invalid, an error message will be returned.
Successful Response
Error Response
If the request is invalid or there are issues processing the request, the following error response will be returned:
Fields in Successful Response
status: Indicates the success status of the request (e.g., "success").
status_code: HTTP status code of the response (e.g., 200 for success).
message: A message describing the result of the request (e.g., "Virtual card created successfully").
data: Contains the details of the newly created virtual card.
id: Unique identifier of the virtual card.
balance: Initial balance loaded onto the virtual card.
cardNumber: Full number of the virtual card.
last4: Last four digits of the card number.
cardName: Name on the virtual card.
cardType: Type of the card (e.g., "virtual").
cardBrand: Brand of the card (e.g., "visa").
cvv2: CVV2 code of the virtual card.
expiry: Expiry date and time of the card in ISO 8601 format.
valid: Validity of the card in MM/YYYY format.
billingAddress: Billing address associated with the virtual card.
city: City of the billing address.
state: State of the billing address.
street: Street address.
country: Country of the billing address.
zipCode: Postal code of the billing address.
countryCode: Country code of the billing address.
By following the above details, you can successfully create a new virtual card for a customer.
Last updated