Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

Create User (Merchant)

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

Create a new merchant in the specified community. Only Username & MSISDN is required. This action is implicitly guarded. If a user with the specified details already exists in another community, you will receive an error: '-504,Transaction Field - User cannot be implicitly added to this community'.

Once complete, you have authorization to perform your whitelisted actions on this merchant.

FieldTypeRequirementDescription
UsernameStringRequiredA unique username that acts as your user’s identifier.
MSISDNStringRequiredThe cell number where your user can receive SMS communication.
IDNumberStringOptionalThe ID number of the user. If supplied, it must be unique in your community.
PasswordStringOptionalThe user’s login password. If not provided, user will receive a random 5-digit password.
TimezoneStringOptionalThe user’s local timezone for accurate date and time display.
CurrencyStringOptionalThe default currency of the user. Default is ZAR.
ProfileImageUrlStringOptionalA URL pointing to the user’s profile picture.
BannerImageUrlStringOptionalA URL for the user’s profile banner or cover image.
DisplayNameStringOptionalThe display name of the user. If left empty, will be populated with the Username.
FirstNameStringOptionalThe first name of the user.
LastNameStringOptionalThe last name of the user.
EmailStringOptionalThe email address associated with the user.
HouseNumberStringOptionalThe house number of the user’s residential address.
StreetNameStringOptionalThe street name of the user’s residential address.
SuburbStringOptionalThe suburb of the user’s residential address.
TownStringOptionalThe town of the user’s residential address.
ProvinceStringOptionalThe province of the user’s residential address.
AccountNameStringOptionalThe account name of the user’s bank account.
AccountNumberStringOptionalThe account number of the user’s bank account.
AccountTypeStringOptionalThe account type of the user’s bank account.
BankNameStringOptionalThe name of the user’s bank.
BranchCodeStringOptionalThe branch code of the user’s bank.
CanWithdrawStringOptionalSpecifies if the merchant is permitted to perform a withdrawal with customers (0 or 1).
LowBalanceAlertAmountStringOptionalThreshold in cents to trigger a low balance notification.
ProviderStringOptionalThe merchant provider associated with the merchant’s account.
GroupStringOptionalThe merchant group associated with the merchant’s account.
LongitudeStringOptionalThe longitude of the user’s location for mapping services.
LatitudeStringOptionalThe latitude of the user’s location for mapping services.
CommercialRegistrationNumberStringOptionalThe commercial registration number of the merchant’s enterprise.
TaxNumberStringOptionalThe tax number of the merchant’s enterprise.
StoreIDStringOptionalThe globally routed StoreID that is used with transaction APIs.
UMetadataStringOptionalAny other detail that you would like to store on this user.
MetadataStringOptionalAny other detail that the merchant wishes to store on this transaction.
{
"Username": "merchant_27823334444",
"MSISDN": "27823334444",
"IDNumber": "0108256028085",
"Password": "P@ssw0rd123",
"Timezone": "Africa/Johannesburg",
"Currency": "ZAR",
"ProfileImageUrl": "https://example.com/profile/27648302057.jpg",
"BannerImageUrl": "https://example.com/banner/27648302057.jpg",
"DisplayName": "SuperMart",
"FirstName": "John",
"LastName": "Dory",
"Email": "john@celbux.com",
"HouseNumber": "2009",
"StreetName": "Maritime Street",
"Suburb": "Centurion",
"Town": "Pretoria",
"Province": "Gauteng",
"AccountName": "MR J DORY",
"AccountNumber": "6287805043",
"AccountType": "Savings",
"BankName": "FNB",
"BranchCode": "250655",
"CanWithdraw": "1",
"LowBalanceAlertAmount": "10000",
"Provider": "ParentCompany",
"Group": "FoodCompanyA",
"Longitude": "28.2833",
"Latitude": "-25.7479",
"CommercialRegistrationNumber": "2012/759414/07",
"TaxNumber": "0777885252",
"StoreID": "SM001",
"UMetadata": "{\"Sender\":\"John D\"}",
"Metadata": "{\"ActorUserIDs\": \"547828938941114\"}"
}
Terminal window
curl -X POST '{api-url}/createMerchant?ns={community}' \
-H 'Authorization: bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"Username":"merchant_27823334444","MSISDN":"27823334444","IDNumber":"0108256028085","Password":"P@ssw0rd123","Timezone":"Africa/Johannesburg","Currency":"ZAR","ProfileImageUrl":"https://example.com/profile/27648302057.jpg","BannerImageUrl":"https://example.com/banner/27648302057.jpg","DisplayName":"SuperMart","FirstName":"John","LastName":"Dory","Email":"john@celbux.com","HouseNumber":"2009","StreetName":"Maritime Street","Suburb":"Centurion","Town":"Pretoria","Province":"Gauteng","AccountName":"MR J DORY","AccountNumber":"6287805043","AccountType":"Savings","BankName":"FNB","BranchCode":"250655","CanWithdraw":"1","LowBalanceAlertAmount":"10000","Provider":"ParentCompany","Group":"FoodCompanyA","Longitude":"28.2833","Latitude":"-25.7479","CommercialRegistrationNumber":"2012/759414/07","TaxNumber":"0777885252","StoreID":"SM001","UMetadata":"{\"Sender\":\"John D\"}","Metadata":"{\"ActorUserIDs\": \"547828938941114\"}"}'