Core to Wallet PayFast

Documentations

Documentations for API

End Points

https://z-sandbox.jsbl.com/zconnect/api/v1/CoreToWalletPayfast

Http Method

POST

Header

Name Type Values Description
Accept JSON application/json
Content-Type JSON application/json
clientId String *************
clientSecret String Access-Token Auth2.0 verification
organizationId String 223 Authenticate organization

Request Parameters

Name Description Required Parameter Type Length Sample Value
OtpPin OtpPin Optional STRING
PinType PinType Mandatory STRING 01
TraceNo TraceNo Mandatory STRING 673883
DateTime DateTime Mandatory STRING 2023050904
MobileNo MobileNo Mandatory STRING 0318231838
ChannelId ChannelId Mandatory STRING PAYFAST
Reserved1 Reserved1 Mandatory STRING 01
Reserved2 Reserved2 Optional STRING
Reserved3 Reserved3 Optional STRING
Reserved4 Reserved4 Optional STRING
Reserved5 Reserved5 Optional STRING
Reserved6 Reserved6 Optional STRING
Reserved7 Reserved7 Optional STRING
Reserved8 Reserved8 Optional STRING
Reserved9 Reserved9 Optional STRING
Reserved10 Reserved10 Optional STRING
TerminalId TerminalId Mandatory STRING PAYFAST
CompanyName CompanyName Mandatory STRING PAYFAST
MerchantType MerchantType Mandatory STRING 0088
ProcessingCode ProcessingCode Mandatory STRING CoreToWall
TransactionAmount TransactionAmount Mandatory STRING 15

Sample Request

{
    "CoreToWalletReq": {
        "OtpPin": "",
        "PinType": "01",
        "TraceNo": "673883",
        "DateTime": "20230509043156",
        "MobileNo": "03182318381",
        "ChannelId": "PAYFAST",
        "Reserved1": "01",
        "Reserved2": "",
        "Reserved3": "",
        "Reserved4": "",
        "Reserved5": "",
        "Reserved6": "",
        "Reserved7": "",
        "Reserved8": "",
        "Reserved9": "",
        "Reserved10": "",
        "TerminalId": "PAYFAST",
        "CompanyName": "PAYFAST",
        "MerchantType": "0088",
        "ProcessingCode": "CoreToWallet",
        "TransactionAmount": "15"
    }
}

Response Parameters

Name Description Parameter Type Length Sample Value
merchantType merchantType String 0088
traceNo traceNo String 673883
companyName companyName String PAYFAST
dateTime dateTime String 20230509043156
responseCode responseCode String 00
responseDescription responseDescription String Successfull
transactionId transactionId String 467137964224

Response Sample

{
    "CoreToWalletResp": {
        "merchantType": "0088",
        "traceNo": "673883",
        "companyName": "PAYFAST",
        "dateTime": "20230509043156",
        "responseCode": "00",
        "responseDescription": "Successfull",
        "transactionId": "467137964224"
    }
}
curl --location --request POST 'https://z-sandbox.jsbl.com/zconnect/api/v1/CoreToWalletPayfast' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'clientId: 364E9806o51K9' \
--header 'clientSecret: eyJhbGciOiJIUzUxMiJ9.eyJleHAiOjE2OTI2MzcxOTl9.0s3evOaGFm6uyRxSioiXlOffHbZTDIB1zB1xl3ck_IIfxSrsARI9tPiooIOVjVv9rQqUInqtk1odcWtk8V3rFA' \
--header 'organizationId: 223' \
--data-raw '{
   "CoreToWalletReq": {
       "OtpPin": "",
       "PinType": "01",
       "TraceNo": "673883",
       "DateTime": "20230509043156",
       "MobileNo": "03182318381",
       "ChannelId": "PAYFAST",
       "Reserved1": "01",
       "Reserved2": "",
       "Reserved3": "",
       "Reserved4": "",
       "Reserved5": "",
       "Reserved6": "",
       "Reserved7": "",
       "Reserved8": "",
       "Reserved9": "",
       "Reserved10": "",
       "TerminalId": "PAYFAST",
       "CompanyName": "PAYFAST",
       "MerchantType": "0088",
       "ProcessingCode": "CoreToWallet",
       "TransactionAmount": "15"
   }
}'
var request = require('request');
var options = {
 'method': 'POST',
 'url': 'https://z-sandbox.jsbl.com/zconnect/api/v1/CoreToWalletPayfast',
 'headers': {
   'Content-Type': 'application/json',
   'Accept': 'application/json',
   'clientId': '364E9806o51K9',
   'clientSecret': 'eyJhbGciOiJIUzUxMiJ9.eyJleHAiOjE2OTI2MzcxOTl9.0s3evOaGFm6uyRxSioiXlOffHbZTDIB1zB1xl3ck_IIfxSrsARI9tPiooIOVjVv9rQqUInqtk1odcWtk8V3rFA',
   'organizationId': '223'
 },
 body: JSON.stringify({
   "CoreToWalletReq": {
     "OtpPin": "",
     "PinType": "01",
     "TraceNo": "673883",
     "DateTime": "20230509043156",
     "MobileNo": "03182318381",
     "ChannelId": "PAYFAST",
     "Reserved1": "01",
     "Reserved2": "",
     "Reserved3": "",
     "Reserved4": "",
     "Reserved5": "",
     "Reserved6": "",
     "Reserved7": "",
     "Reserved8": "",
     "Reserved9": "",
     "Reserved10": "",
     "TerminalId": "PAYFAST",
     "CompanyName": "PAYFAST",
     "MerchantType": "0088",
     "ProcessingCode": "CoreToWallet",
     "TransactionAmount": "15"
   }
 })

};
request(options, function (error, response) {
 if (error) throw new Error(error);
 console.log(response.body);
});

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://z-sandbox.jsbl.com/zconnect/api/v1/CoreToWalletPayfast');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
 'follow_redirects' => TRUE
));
$request->setHeader(array(
 'Content-Type' => 'application/json',
 'Accept' => 'application/json',
 'clientId' => '364E9806o51K9',
 'clientSecret' => 'eyJhbGciOiJIUzUxMiJ9.eyJleHAiOjE2OTI2MzcxOTl9.0s3evOaGFm6uyRxSioiXlOffHbZTDIB1zB1xl3ck_IIfxSrsARI9tPiooIOVjVv9rQqUInqtk1odcWtk8V3rFA',
 'organizationId' => '223'
));
$request->setBody('{
\n    "CoreToWalletReq": {
\n        "OtpPin": "",
\n        "PinType": "01",
\n        "TraceNo": "673883",
\n        "DateTime": "20230509043156",
\n        "MobileNo": "03182318381",
\n        "ChannelId": "PAYFAST",
\n        "Reserved1": "01",
\n        "Reserved2": "",
\n        "Reserved3": "",
\n        "Reserved4": "",
\n        "Reserved5": "",
\n        "Reserved6": "",
\n        "Reserved7": "",
\n        "Reserved8": "",
\n        "Reserved9": "",
\n        "Reserved10": "",
\n        "TerminalId": "PAYFAST",
\n        "CompanyName": "PAYFAST",
\n        "MerchantType": "0088",
\n        "ProcessingCode": "CoreToWallet",
\n        "TransactionAmount": "15"
\n    }
\n}');
try {
 $response = $request->send();
 if ($response->getStatus() == 200) {
   echo $response->getBody();
 }
 else {
   echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
   $response->getReasonPhrase();
 }
}
catch(HTTP_Request2_Exception $e) {
 echo 'Error: ' . $e->getMessage();
}
require "uri"
require "json"
require "net/http"

url = URI("https://z-sandbox.jsbl.com/zconnect/api/v1/CoreToWalletPayfast")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request["Accept"] = "application/json"
request["clientId"] = "364E9806o51K9"
request["clientSecret"] = "eyJhbGciOiJIUzUxMiJ9.eyJleHAiOjE2OTI2MzcxOTl9.0s3evOaGFm6uyRxSioiXlOffHbZTDIB1zB1xl3ck_IIfxSrsARI9tPiooIOVjVv9rQqUInqtk1odcWtk8V3rFA"
request["organizationId"] = "223"
request.body = JSON.dump({
 "CoreToWalletReq": {
   "OtpPin": "",
   "PinType": "01",
   "TraceNo": "673883",
   "DateTime": "20230509043156",
   "MobileNo": "03182318381",
   "ChannelId": "PAYFAST",
   "Reserved1": "01",
   "Reserved2": "",
   "Reserved3": "",
   "Reserved4": "",
   "Reserved5": "",
   "Reserved6": "",
   "Reserved7": "",
   "Reserved8": "",
   "Reserved9": "",
   "Reserved10": "",
   "TerminalId": "PAYFAST",
   "CompanyName": "PAYFAST",
   "MerchantType": "0088",
   "ProcessingCode": "CoreToWallet",
   "TransactionAmount": "15"
 }
})

response = https.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient().newBuilder()
 .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n    \"CoreToWalletReq\": {\r\n        \"OtpPin\": \"\",\r\n        \"PinType\": \"01\",\r\n        \"TraceNo\": \"673883\",\r\n        \"DateTime\": \"20230509043156\",\r\n        \"MobileNo\": \"03182318381\",\r\n        \"ChannelId\": \"PAYFAST\",\r\n        \"Reserved1\": \"01\",\r\n        \"Reserved2\": \"\",\r\n        \"Reserved3\": \"\",\r\n        \"Reserved4\": \"\",\r\n        \"Reserved5\": \"\",\r\n        \"Reserved6\": \"\",\r\n        \"Reserved7\": \"\",\r\n        \"Reserved8\": \"\",\r\n        \"Reserved9\": \"\",\r\n        \"Reserved10\": \"\",\r\n        \"TerminalId\": \"PAYFAST\",\r\n        \"CompanyName\": \"PAYFAST\",\r\n        \"MerchantType\": \"0088\",\r\n        \"ProcessingCode\": \"CoreToWallet\",\r\n        \"TransactionAmount\": \"15\"\r\n    }\r\n}");
Request request = new Request.Builder()
 .url("https://z-sandbox.jsbl.com/zconnect/api/v1/CoreToWalletPayfast")
 .method("POST", body)
 .addHeader("Content-Type", "application/json")
 .addHeader("Accept", "application/json")
 .addHeader("clientId", "364E9806o51K9")
 .addHeader("clientSecret", "eyJhbGciOiJIUzUxMiJ9.eyJleHAiOjE2OTI2MzcxOTl9.0s3evOaGFm6uyRxSioiXlOffHbZTDIB1zB1xl3ck_IIfxSrsARI9tPiooIOVjVv9rQqUInqtk1odcWtk8V3rFA")
 .addHeader("organizationId", "223")
 .build();
Response response = client.newCall(request).execute();
var client = new RestClient("https://z-sandbox.jsbl.com/zconnect/api/v1/CoreToWalletPayfast");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("clientId", "364E9806o51K9");
request.AddHeader("clientSecret", "eyJhbGciOiJIUzUxMiJ9.eyJleHAiOjE2OTI2MzcxOTl9.0s3evOaGFm6uyRxSioiXlOffHbZTDIB1zB1xl3ck_IIfxSrsARI9tPiooIOVjVv9rQqUInqtk1odcWtk8V3rFA");
request.AddHeader("organizationId", "223");
var body = @"{
" + "\n" +
@"    ""CoreToWalletReq"": {
" + "\n" +
@"        ""OtpPin"": """",
" + "\n" +
@"        ""PinType"": ""01"",
" + "\n" +
@"        ""TraceNo"": ""673883"",
" + "\n" +
@"        ""DateTime"": ""20230509043156"",
" + "\n" +
@"        ""MobileNo"": ""03182318381"",
" + "\n" +
@"        ""ChannelId"": ""PAYFAST"",
" + "\n" +
@"        ""Reserved1"": ""01"",
" + "\n" +
@"        ""Reserved2"": """",
" + "\n" +
@"        ""Reserved3"": """",
" + "\n" +
@"        ""Reserved4"": """",
" + "\n" +
@"        ""Reserved5"": """",
" + "\n" +
@"        ""Reserved6"": """",
" + "\n" +
@"        ""Reserved7"": """",
" + "\n" +
@"        ""Reserved8"": """",
" + "\n" +
@"        ""Reserved9"": """",
" + "\n" +
@"        ""Reserved10"": """",
" + "\n" +
@"        ""TerminalId"": ""PAYFAST"",
" + "\n" +
@"        ""CompanyName"": ""PAYFAST"",
" + "\n" +
@"        ""MerchantType"": ""0088"",
" + "\n" +
@"        ""ProcessingCode"": ""CoreToWallet"",
" + "\n" +
@"        ""TransactionAmount"": ""15""
" + "\n" +
@"    }
" + "\n" +
@"}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Response Code Details

{
    "CoreToWalletResp": {
        "merchantType": "0088",
        "traceNo": "673883",
        "companyName": "PAYFAST",
        "dateTime": "20230509043156",
        "responseCode": "00",
        "responseDescription": "Successfull",
        "transactionId": "467137964224"
    }
}
{
    "messages": "Bad Request - Invalid Access Token",
    "errorcode": "4001"
}

{
    "messages": "Bad Request - Invalid Request Payload",
    "errorcode": "4002"
}

{
    "messages": "Bad Request - Invalid Authorization Header",
    "errorcode": "4003"
}

{
    "messages": "Something Went Wrong",
    "errorcode": "4004"
}

{
    "messages": "Record Not Found",
    "errorcode": "4005"
}

{
    "messages": "Invalid Client Id\/Secret",
    "errorcode": "4006"
}

{
    "messages": "Bad Request - Invalid Access Token",
    "errorcode": "4007"
}

Try out yourself

Security

X-IBM-Client-Id(apiKey located in header)
X-IBM-Client-Secret(apiKey located in header)
1c48aa28-2614-486f-aa2c-cbc86cc7ab51

Header Parameter

Name Values Description
Content-Type application/json Content Type application/json is supported
Accept application/json Content Type application/json is supported
organizationId xyz You will make a call to the auth-blb api and give it your client ID. You should add the client secret and organisation ID it returns here.
clientId Enter your verified Client Id
clientSecret Enter Your Verified Client Secret

Request Body

Response Body