API Reference
Virtual Cards
Create card [POST]

Create Card


https://sandboxapi.bitnob.co/api/v1/virtualcards/create (opens in a new tab)

create a new card for a customer

Body Parameters

ParametertypeRequired
customerEmail
The customer's email address. Ensure the customer has already being indexed
string
cardBrand
Only required with Visa Card
string
cardType
Defaults to visa
string
reference
string
amount
string
firstName
Only needed on sandbox
string
lastName
Only needed on sandbox
string

Request

Virtual Cards/Create Card [POST]
curl --request POST \
   --url https://sandboxapi.bitnob.co/api/v1/virtualcards/create \
   --header 'Authorization: Bearer API-KEY' \
   --header 'accept: application/json' \
   --header 'content-type: application/json' \
   --data '
{
"customerEmail": "abc@gmail.com",
"firstName": "Nana",
"lastName": "Mends",
"cardBrand": "mastercard",
"cardType": "giftcard",
"amount": 500,
"reference": "jadadkaaiudkkjahyyy111"
}
'

Responses

🟢 200 - Result example
{
"status": true,
"message": "card creation in progress",
"data": {
  "id": "86435436-3c86-4d3d-bdcb-897fe2a20d88",
  "createdAt": "2023-03-02T15:58:17.775Z",
  "updatedAt": "2023-03-02T15:58:17.775Z",
  "cardType": "virtual",
  "cardBrand": "visa",
  "cardUserId": "1af3a823-10a5-4098-8bc9-d5c2e9f9ba44",
  "reference": "jadadkaaiudkkjahyyy111",
  "createdStatus": "pending",
  "customerId": null
}
}
Last updated on