Skip to content

Create Card PAN

POST {api-url}/createCardPAN?ns={community}

Use this endpoint to create a new physical or virtual Card PAN.

Creating a card assigns a new physical or virtual Card PAN to a user. A user may only own a single active card per VoucherType. If a user already possesses a card for the specified VoucherType, this endpoint will automatically act as a Top-Up operation, adding funds to the existing card.

To create an unlinked, floating card, leave Username blank and set Amount to 0.

FieldTypeRequirementDescription
CardPANStringOptionalThe PAN to target. Optional if VoucherType and Username are used to create a new card.
CardPANReferenceStringOptionalCan be used instead of CardPAN to top up or target a specific card.
AmountStringRequiredThe amount in cents to top up or initialize the card with.
CurrencyStringRequiredThe currency of the amount.
VoucherTypeStringOptionalThe type of voucher linked to the card.
AutoCreateVoucherStringOptionalWhether to automatically create vouchers during shortfalls. (true or false)
UsernameStringOptionalThe username of the card owner. If empty and Amount is 0, creates a floating unlinked card.
IDNumberStringOptionalThe ID number of the user.
StoreIDStringRequiredA unique identifier for the funding store.
MetadataStringOptionalAny other detail to store with this transaction.
{
"CardPAN": "",
"CardPANReference": "",
"Amount": "10000",
"Currency": "ZAR",
"VoucherType": "168Cash",
"AutoCreateVoucher": "true",
"Username": "27820000000",
"IDNumber": "",
"StoreID": "Celbux",
"Metadata": ""
}
Terminal window
curl -X POST '{api-url}/createCardPAN?ns={community}' \
-H 'Authorization: bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"CardPAN":"","CardPANReference":"","Amount":"10000","Currency":"ZAR","VoucherType":"168Cash","AutoCreateVoucher":"true","Username":"27820000000","IDNumber":"","StoreID":"Celbux","Metadata":""}'