production
development
https://sandbox.sibspayments.com
Paths
/{id}/card/purchase
post /{id}/card/purchase
clientid
X-IBM-Client-Id
(apiKey located in header)
input
Required in body
object
id
Required in path
string
authorization
Required in header
string
Signature
Optional in header
string
For now, the type of HMAC used will be SHA2 (SHA512). base64
{
"maxLength": 128
}
Content-Type
Optional in header
string
application/json
Accept
Optional in header
string
application/json
200
200 OK
Example Request
curl --request POST \
--url https://sandbox.sibspayments.com/sibs/spg/v2/payments/REPLACE_ID/card/purchase \
--header 'Signature: REPLACE_THIS_VALUE' \
--header 'X-IBM-Client-Id: REPLACE_THIS_KEY' \
--header 'accept: application/json' \
--header 'authorization: REPLACE_THIS_VALUE' \
--header 'content-type: application/json' \
--data '{"cardInfo":{"PAN":"12312312","secureCode":"123","validationDate":"2031-12-31T00:00:00.000Z","cardholderName":"Test","createToken":false},"info":{"deviceInfo":{"browserAcceptHeader":"3528664295618797","browserJavaEnabled":"gujil","browserLanguage":"KH","browserColorDepth":"#efd663","browserScreenHeight":"apkajkitidodegew","browserScreenWidth":"1483526245449728","browserTZ":"pucillo","browserUserAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36","systemFamily":"lobizaj","systemVersion":"rikfa","systemArchitecture":"vammezmateh","deviceManufacturer":"imelavuthechie","deviceModel":"rozei","deviceID":"1881170266554368","applicationName":"Inez Jennings","applicationVersion":"netehimcuekamasl","geoLocalization":"tupegbavpajcucdi","ipAddress":"142.61.28.215","browserJavascriptEnabled":"112.180.181.6"},"customerInfo":[{"key":"lagoc","value":"47.92"},{"key":"suovejaca","value":"52.57"},{"key":"uwikownirtu","value":"44.44"}]},"actionProcessed":{"id":"2321628436365312","type":"THREEDS_METHOD","executed":false},"tokenInfo":{"tokenType":"Card","value":"89.07","secureCode":""},"instalmentPlan":{"id":"111"},"merchantInitiatedTransaction":{"customerAcceptance":false}}'
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://sandbox.sibspayments.com/sibs/spg/v2/payments/REPLACE_ID/card/purchase")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["X-IBM-Client-Id"] = 'REPLACE_THIS_KEY'
request["authorization"] = 'REPLACE_THIS_VALUE'
request["Signature"] = 'REPLACE_THIS_VALUE'
request["content-type"] = 'application/json'
request["accept"] = 'application/json'
request.body = "{\"cardInfo\":{\"PAN\":\"12312312\",\"secureCode\":\"123\",\"validationDate\":\"2031-12-31T00:00:00.000Z\",\"cardholderName\":\"Test\",\"createToken\":false},\"info\":{\"deviceInfo\":{\"browserAcceptHeader\":\"3528664295618797\",\"browserJavaEnabled\":\"gujil\",\"browserLanguage\":\"KH\",\"browserColorDepth\":\"#efd663\",\"browserScreenHeight\":\"apkajkitidodegew\",\"browserScreenWidth\":\"1483526245449728\",\"browserTZ\":\"pucillo\",\"browserUserAgent\":\"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36\",\"systemFamily\":\"lobizaj\",\"systemVersion\":\"rikfa\",\"systemArchitecture\":\"vammezmateh\",\"deviceManufacturer\":\"imelavuthechie\",\"deviceModel\":\"rozei\",\"deviceID\":\"1881170266554368\",\"applicationName\":\"Inez Jennings\",\"applicationVersion\":\"netehimcuekamasl\",\"geoLocalization\":\"tupegbavpajcucdi\",\"ipAddress\":\"142.61.28.215\",\"browserJavascriptEnabled\":\"112.180.181.6\"},\"customerInfo\":[{\"key\":\"lagoc\",\"value\":\"47.92\"},{\"key\":\"suovejaca\",\"value\":\"52.57\"},{\"key\":\"uwikownirtu\",\"value\":\"44.44\"}]},\"actionProcessed\":{\"id\":\"2321628436365312\",\"type\":\"THREEDS_METHOD\",\"executed\":false},\"tokenInfo\":{\"tokenType\":\"Card\",\"value\":\"89.07\",\"secureCode\":\"\"},\"instalmentPlan\":{\"id\":\"111\"},\"merchantInitiatedTransaction\":{\"customerAcceptance\":false}}"
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("sandbox.sibspayments.com")
payload = "{\"cardInfo\":{\"PAN\":\"12312312\",\"secureCode\":\"123\",\"validationDate\":\"2031-12-31T00:00:00.000Z\",\"cardholderName\":\"Test\",\"createToken\":false},\"info\":{\"deviceInfo\":{\"browserAcceptHeader\":\"3528664295618797\",\"browserJavaEnabled\":\"gujil\",\"browserLanguage\":\"KH\",\"browserColorDepth\":\"#efd663\",\"browserScreenHeight\":\"apkajkitidodegew\",\"browserScreenWidth\":\"1483526245449728\",\"browserTZ\":\"pucillo\",\"browserUserAgent\":\"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36\",\"systemFamily\":\"lobizaj\",\"systemVersion\":\"rikfa\",\"systemArchitecture\":\"vammezmateh\",\"deviceManufacturer\":\"imelavuthechie\",\"deviceModel\":\"rozei\",\"deviceID\":\"1881170266554368\",\"applicationName\":\"Inez Jennings\",\"applicationVersion\":\"netehimcuekamasl\",\"geoLocalization\":\"tupegbavpajcucdi\",\"ipAddress\":\"142.61.28.215\",\"browserJavascriptEnabled\":\"112.180.181.6\"},\"customerInfo\":[{\"key\":\"lagoc\",\"value\":\"47.92\"},{\"key\":\"suovejaca\",\"value\":\"52.57\"},{\"key\":\"uwikownirtu\",\"value\":\"44.44\"}]},\"actionProcessed\":{\"id\":\"2321628436365312\",\"type\":\"THREEDS_METHOD\",\"executed\":false},\"tokenInfo\":{\"tokenType\":\"Card\",\"value\":\"89.07\",\"secureCode\":\"\"},\"instalmentPlan\":{\"id\":\"111\"},\"merchantInitiatedTransaction\":{\"customerAcceptance\":false}}"
headers = {
'X-IBM-Client-Id': "REPLACE_THIS_KEY",
'authorization': "REPLACE_THIS_VALUE",
'Signature': "REPLACE_THIS_VALUE",
'content-type': "application/json",
'accept': "application/json"
}
conn.request("POST", "/sibs/spg/v2/payments/REPLACE_ID/card/purchase", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.sibspayments.com/sibs/spg/v2/payments/REPLACE_ID/card/purchase",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"cardInfo\":{\"PAN\":\"12312312\",\"secureCode\":\"123\",\"validationDate\":\"2031-12-31T00:00:00.000Z\",\"cardholderName\":\"Test\",\"createToken\":false},\"info\":{\"deviceInfo\":{\"browserAcceptHeader\":\"3528664295618797\",\"browserJavaEnabled\":\"gujil\",\"browserLanguage\":\"KH\",\"browserColorDepth\":\"#efd663\",\"browserScreenHeight\":\"apkajkitidodegew\",\"browserScreenWidth\":\"1483526245449728\",\"browserTZ\":\"pucillo\",\"browserUserAgent\":\"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36\",\"systemFamily\":\"lobizaj\",\"systemVersion\":\"rikfa\",\"systemArchitecture\":\"vammezmateh\",\"deviceManufacturer\":\"imelavuthechie\",\"deviceModel\":\"rozei\",\"deviceID\":\"1881170266554368\",\"applicationName\":\"Inez Jennings\",\"applicationVersion\":\"netehimcuekamasl\",\"geoLocalization\":\"tupegbavpajcucdi\",\"ipAddress\":\"142.61.28.215\",\"browserJavascriptEnabled\":\"112.180.181.6\"},\"customerInfo\":[{\"key\":\"lagoc\",\"value\":\"47.92\"},{\"key\":\"suovejaca\",\"value\":\"52.57\"},{\"key\":\"uwikownirtu\",\"value\":\"44.44\"}]},\"actionProcessed\":{\"id\":\"2321628436365312\",\"type\":\"THREEDS_METHOD\",\"executed\":false},\"tokenInfo\":{\"tokenType\":\"Card\",\"value\":\"89.07\",\"secureCode\":\"\"},\"instalmentPlan\":{\"id\":\"111\"},\"merchantInitiatedTransaction\":{\"customerAcceptance\":false}}",
CURLOPT_HTTPHEADER => [
"Signature: REPLACE_THIS_VALUE",
"X-IBM-Client-Id: REPLACE_THIS_KEY",
"accept: application/json",
"authorization: REPLACE_THIS_VALUE",
"content-type: application/json"
],
]);
$
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.sibspayments.com/sibs/spg/v2/payments/REPLACE_ID/card/purchase",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"cardInfo\":{\"PAN\":\"12312312\",\"secureCode\":\"123\",\"validationDate\":\"2031-12-31T00:00:00.000Z\",\"cardholderName\":\"Test\",\"createToken\":false},\"info\":{\"deviceInfo\":{\"browserAcceptHeader\":\"3528664295618797\",\"browserJavaEnabled\":\"gujil\",\"browserLanguage\":\"KH\",\"browserColorDepth\":\"#efd663\",\"browserScreenHeight\":\"apkajkitidodegew\",\"browserScreenWidth\":\"1483526245449728\",\"browserTZ\":\"pucillo\",\"browserUserAgent\":\"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36\",\"systemFamily\":\"lobizaj\",\"systemVersion\":\"rikfa\",\"systemArchitecture\":\"vammezmateh\",\"deviceManufacturer\":\"imelavuthechie\",\"deviceModel\":\"rozei\",\"deviceID\":\"1881170266554368\",\"applicationName\":\"Inez Jennings\",\"applicationVersion\":\"netehimcuekamasl\",\"geoLocalization\":\"tupegbavpajcucdi\",\"ipAddress\":\"142.61.28.215\",\"browserJavascriptEnabled\":\"112.180.181.6\"},\"customerInfo\":[{\"key\":\"lagoc\",\"value\":\"47.92\"},{\"key\":\"suovejaca\",\"value\":\"52.57\"},{\"key\":\"uwikownirtu\",\"value\":\"44.44\"}]},\"actionProcessed\":{\"id\":\"2321628436365312\",\"type\":\"THREEDS_METHOD\",\"executed\":false},\"tokenInfo\":{\"tokenType\":\"Card\",\"value\":\"89.07\",\"secureCode\":\"\"},\"instalmentPlan\":{\"id\":\"111\"},\"merchantInitiatedTransaction\":{\"customerAcceptance\":false}}",
CURLOPT_HTTPHEADER => [
"Signature: REPLACE_THIS_VALUE",
"X-IBM-Client-Id: REPLACE_THIS_KEY",
"accept: application/json",
"authorization: REPLACE_THIS_VALUE",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
x
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"cardInfo\":{\"PAN\":\"12312312\",\"secureCode\":\"123\",\"validationDate\":\"2031-12-31T00:00:00.000Z\",\"cardholderName\":\"Test\",\"createToken\":false},\"info\":{\"deviceInfo\":{\"browserAcceptHeader\":\"3528664295618797\",\"browserJavaEnabled\":\"gujil\",\"browserLanguage\":\"KH\",\"browserColorDepth\":\"#efd663\",\"browserScreenHeight\":\"apkajkitidodegew\",\"browserScreenWidth\":\"1483526245449728\",\"browserTZ\":\"pucillo\",\"browserUserAgent\":\"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36\",\"systemFamily\":\"lobizaj\",\"systemVersion\":\"rikfa\",\"systemArchitecture\":\"vammezmateh\",\"deviceManufacturer\":\"imelavuthechie\",\"deviceModel\":\"rozei\",\"deviceID\":\"1881170266554368\",\"applicationName\":\"Inez Jennings\",\"applicationVersion\":\"netehimcuekamasl\",\"geoLocalization\":\"tupegbavpajcucdi\",\"ipAddress\":\"142.61.28.215\",\"browserJavascriptEnabled\":\"112.180.181.6\"},\"customerInfo\":[{\"key\":\"lagoc\",\"value\":\"47.92\"},{\"key\":\"suovejaca\",\"value\":\"52.57\"},{\"key\":\"uwikownirtu\",\"value\":\"44.44\"}]},\"actionProcessed\":{\"id\":\"2321628436365312\",\"type\":\"THREEDS_METHOD\",\"executed\":false},\"tokenInfo\":{\"tokenType\":\"Card\",\"value\":\"89.07\",\"secureCode\":\"\"},\"instalmentPlan\":{\"id\":\"111\"},\"merchantInitiatedTransaction\":{\"customerAcceptance\":false}}");
Request request = new Request.Builder()
.url("https://sandbox.sibspayments.com/sibs/spg/v2/payments/REPLACE_ID/card/purchase")
.post(body)
.addHeader("X-IBM-Client-Id", "REPLACE_THIS_KEY")
.addHeader("authorization", "REPLACE_THIS_VALUE")
.addHeader("Signature", "REPLACE_THIS_VALUE")
.addHeader("content-type", "application/json")
.addHeader("accept", "application/json")
.build();
Response response = client.newCall(request).exec
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"cardInfo\":{\"PAN\":\"12312312\",\"secureCode\":\"123\",\"validationDate\":\"2031-12-31T00:00:00.000Z\",\"cardholderName\":\"Test\",\"createToken\":false},\"info\":{\"deviceInfo\":{\"browserAcceptHeader\":\"3528664295618797\",\"browserJavaEnabled\":\"gujil\",\"browserLanguage\":\"KH\",\"browserColorDepth\":\"#efd663\",\"browserScreenHeight\":\"apkajkitidodegew\",\"browserScreenWidth\":\"1483526245449728\",\"browserTZ\":\"pucillo\",\"browserUserAgent\":\"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36\",\"systemFamily\":\"lobizaj\",\"systemVersion\":\"rikfa\",\"systemArchitecture\":\"vammezmateh\",\"deviceManufacturer\":\"imelavuthechie\",\"deviceModel\":\"rozei\",\"deviceID\":\"1881170266554368\",\"applicationName\":\"Inez Jennings\",\"applicationVersion\":\"netehimcuekamasl\",\"geoLocalization\":\"tupegbavpajcucdi\",\"ipAddress\":\"142.61.28.215\",\"browserJavascriptEnabled\":\"112.180.181.6\"},\"customerInfo\":[{\"key\":\"lagoc\",\"value\":\"47.92\"},{\"key\":\"suovejaca\",\"value\":\"52.57\"},{\"key\":\"uwikownirtu\",\"value\":\"44.44\"}]},\"actionProcessed\":{\"id\":\"2321628436365312\",\"type\":\"THREEDS_METHOD\",\"executed\":false},\"tokenInfo\":{\"tokenType\":\"Card\",\"value\":\"89.07\",\"secureCode\":\"\"},\"instalmentPlan\":{\"id\":\"111\"},\"merchantInitiatedTransaction\":{\"customerAcceptance\":false}}");
Request request = new Request.Builder()
.url("https://sandbox.sibspayments.com/sibs/spg/v2/payments/REPLACE_ID/card/purchase")
.post(body)
.addHeader("X-IBM-Client-Id", "REPLACE_THIS_KEY")
.addHeader("authorization", "REPLACE_THIS_VALUE")
.addHeader("Signature", "REPLACE_THIS_VALUE")
.addHeader("content-type", "application/json")
.addHeader("accept", "application/json")
.build();
Response response = client.newCall(request).execute();
x
const request = require('request');
const options = {
method: 'POST',
url: 'https://sandbox.sibspayments.com/sibs/spg/v2/payments/REPLACE_ID/card/purchase',
headers: {
'X-IBM-Client-Id': 'REPLACE_THIS_KEY',
authorization: 'REPLACE_THIS_VALUE',
Signature: 'REPLACE_THIS_VALUE',
'content-type': 'application/json',
accept: 'application/json'
},
body: {
cardInfo: {
PAN: '12312312',
secureCode: '123',
validationDate: '2031-12-31T00:00:00.000Z',
cardholderName: 'Test',
createToken: false
},
info: {
deviceInfo: {
browserAcceptHeader: '3528664295618797',
browserJavaEnabled: 'gujil',
browserLanguage: 'KH',
browserColorDepth: '#efd663',
browserScreenHeight: 'apkajkitidodegew',
browserScreenWidth: '1483526245449728',
browserTZ: 'pucillo',
browserUserAgent: 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36',
systemFamily: 'lobizaj',
systemVersion: 'rikfa',
systemArchitecture: 'vammezmateh',
deviceManufacturer: 'imelavuthechie',
deviceModel: 'rozei',
deviceID: '1881170266554368',
applicationName: 'Inez Jennings',
applicationVersion: 'netehimcuekamasl',
geoLocalization: 'tupegbavpajcucdi',
ipAddress: '142.61.28.215',
browserJavascriptEnabled: '112.180.181.6'
},
customerInfo: [
{key: 'lagoc', value: '47.92'},
{key: 'suovejaca', value: '52.57'},
{key: 'uwikownirtu', value: '44.44'}
]
},
actionProcessed: {id: '2321628436365312', type: 'THREEDS_METHOD', executed: false},
tokenInfo: {tokenType: 'Card', value: '89.07', secureCode: ''},
instalmentPlan: {id: '111'},
merchantInitiatedTransaction: {customerAcceptance: false}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.lo
const request = require('request');
const options = {
method: 'POST',
url: 'https://sandbox.sibspayments.com/sibs/spg/v2/payments/REPLACE_ID/card/purchase',
headers: {
'X-IBM-Client-Id': 'REPLACE_THIS_KEY',
authorization: 'REPLACE_THIS_VALUE',
Signature: 'REPLACE_THIS_VALUE',
'content-type': 'application/json',
accept: 'application/json'
},
body: {
cardInfo: {
PAN: '12312312',
secureCode: '123',
validationDate: '2031-12-31T00:00:00.000Z',
cardholderName: 'Test',
createToken: false
},
info: {
deviceInfo: {
browserAcceptHeader: '3528664295618797',
browserJavaEnabled: 'gujil',
browserLanguage: 'KH',
browserColorDepth: '#efd663',
browserScreenHeight: 'apkajkitidodegew',
browserScreenWidth: '1483526245449728',
browserTZ: 'pucillo',
browserUserAgent: 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36',
systemFamily: 'lobizaj',
systemVersion: 'rikfa',
systemArchitecture: 'vammezmateh',
deviceManufacturer: 'imelavuthechie',
deviceModel: 'rozei',
deviceID: '1881170266554368',
applicationName: 'Inez Jennings',
applicationVersion: 'netehimcuekamasl',
geoLocalization: 'tupegbavpajcucdi',
ipAddress: '142.61.28.215',
browserJavascriptEnabled: '112.180.181.6'
},
customerInfo: [
{key: 'lagoc', value: '47.92'},
{key: 'suovejaca', value: '52.57'},
{key: 'uwikownirtu', value: '44.44'}
]
},
actionProcessed: {id: '2321628436365312', type: 'THREEDS_METHOD', executed: false},
tokenInfo: {tokenType: 'Card', value: '89.07', secureCode: ''},
instalmentPlan: {id: '111'},
merchantInitiatedTransaction: {customerAcceptance: false}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
x
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://sandbox.sibspayments.com/sibs/spg/v2/payments/REPLACE_ID/card/purchase"
payload := strings.NewReader("{\"cardInfo\":{\"PAN\":\"12312312\",\"secureCode\":\"123\",\"validationDate\":\"2031-12-31T00:00:00.000Z\",\"cardholderName\":\"Test\",\"createToken\":false},\"info\":{\"deviceInfo\":{\"browserAcceptHeader\":\"3528664295618797\",\"browserJavaEnabled\":\"gujil\",\"browserLanguage\":\"KH\",\"browserColorDepth\":\"#efd663\",\"browserScreenHeight\":\"apkajkitidodegew\",\"browserScreenWidth\":\"1483526245449728\",\"browserTZ\":\"pucillo\",\"browserUserAgent\":\"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36\",\"systemFamily\":\"lobizaj\",\"systemVersion\":\"rikfa\",\"systemArchitecture\":\"vammezmateh\",\"deviceManufacturer\":\"imelavuthechie\",\"deviceModel\":\"rozei\",\"deviceID\":\"1881170266554368\",\"applicationName\":\"Inez Jennings\",\"applicationVersion\":\"netehimcuekamasl\",\"geoLocalization\":\"tupegbavpajcucdi\",\"ipAddress\":\"142.61.28.215\",\"browserJavascriptEnabled\":\"112.180.181.6\"},\"customerInfo\":[{\"key\":\"lagoc\",\"value\":\"47.92\"},{\"key\":\"suovejaca\",\"value\":\"52.57\"},{\"key\":\"uwikownirtu\",\"value\":\"44.44\"}]},\"actionProcessed\":{\"id\":\"2321628436365312\",\"type\":\"THREEDS_METHOD\",\"executed\":false},\"tokenInfo\":{\"tokenType\":\"Card\",\"value\":\"89.07\",\"secureCode\":\"\"},\"instalmentPlan\":{\"id\":\"111\"},\"merchantInitiatedTransaction\":{\"customerAcceptance\":false}}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-IBM-Client-Id", "REPLACE_THIS_KEY")
req.Header.Add("authorization", "REPLACE_THIS_VALUE")
req.Header.Add("Signature", "REPLACE_THIS_VALUE")
req.Header.Add("content-type", "application/json")
req.Header.Add("accept", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.Rea
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://sandbox.sibspayments.com/sibs/spg/v2/payments/REPLACE_ID/card/purchase"
payload := strings.NewReader("{\"cardInfo\":{\"PAN\":\"12312312\",\"secureCode\":\"123\",\"validationDate\":\"2031-12-31T00:00:00.000Z\",\"cardholderName\":\"Test\",\"createToken\":false},\"info\":{\"deviceInfo\":{\"browserAcceptHeader\":\"3528664295618797\",\"browserJavaEnabled\":\"gujil\",\"browserLanguage\":\"KH\",\"browserColorDepth\":\"#efd663\",\"browserScreenHeight\":\"apkajkitidodegew\",\"browserScreenWidth\":\"1483526245449728\",\"browserTZ\":\"pucillo\",\"browserUserAgent\":\"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36\",\"systemFamily\":\"lobizaj\",\"systemVersion\":\"rikfa\",\"systemArchitecture\":\"vammezmateh\",\"deviceManufacturer\":\"imelavuthechie\",\"deviceModel\":\"rozei\",\"deviceID\":\"1881170266554368\",\"applicationName\":\"Inez Jennings\",\"applicationVersion\":\"netehimcuekamasl\",\"geoLocalization\":\"tupegbavpajcucdi\",\"ipAddress\":\"142.61.28.215\",\"browserJavascriptEnabled\":\"112.180.181.6\"},\"customerInfo\":[{\"key\":\"lagoc\",\"value\":\"47.92\"},{\"key\":\"suovejaca\",\"value\":\"52.57\"},{\"key\":\"uwikownirtu\",\"value\":\"44.44\"}]},\"actionProcessed\":{\"id\":\"2321628436365312\",\"type\":\"THREEDS_METHOD\",\"executed\":false},\"tokenInfo\":{\"tokenType\":\"Card\",\"value\":\"89.07\",\"secureCode\":\"\"},\"instalmentPlan\":{\"id\":\"111\"},\"merchantInitiatedTransaction\":{\"customerAcceptance\":false}}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-IBM-Client-Id", "REPLACE_THIS_KEY")
req.Header.Add("authorization", "REPLACE_THIS_VALUE")
req.Header.Add("Signature", "REPLACE_THIS_VALUE")
req.Header.Add("content-type", "application/json")
req.Header.Add("accept", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
x
import Foundation
let headers = [
"X-IBM-Client-Id": "REPLACE_THIS_KEY",
"authorization": "REPLACE_THIS_VALUE",
"Signature": "REPLACE_THIS_VALUE",
"content-type": "application/json",
"accept": "application/json"
]
let parameters = [
"cardInfo": [
"PAN": "12312312",
"secureCode": "123",
"validationDate": "2031-12-31T00:00:00.000Z",
"cardholderName": "Test",
"createToken": false
],
"info": [
"deviceInfo": [
"browserAcceptHeader": "3528664295618797",
"browserJavaEnabled": "gujil",
"browserLanguage": "KH",
"browserColorDepth": "#efd663",
"browserScreenHeight": "apkajkitidodegew",
"browserScreenWidth": "1483526245449728",
"browserTZ": "pucillo",
"browserUserAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36",
"systemFamily": "lobizaj",
"systemVersion": "rikfa",
"systemArchitecture": "vammezmateh",
"deviceManufacturer": "imelavuthechie",
"deviceModel": "rozei",
"deviceID": "1881170266554368",
"applicationName": "Inez Jennings",
"applicationVersion": "netehimcuekamasl",
"geoLocalization": "tupegbavpajcucdi",
"ipAddress": "142.61.28.215",
"browserJavascriptEnabled": "112.180.181.6"
],
"customerInfo": [
[
"key": "lagoc",
"value": "47.92"
],
[
"key": "suovejaca",
"value": "52.57"
],
[
"key": "uwikownirtu",
"value": "44.44"
]
]
],
"actionProcessed": [
"id": "2321628436365312",
"type": "THREEDS_METHOD",
"executed": false
],
"tokenInfo": [
"tokenType": "Card",
"value": "89.07",
"secureCode": ""
],
"instalmentPlan": ["id": "111"],
"merchantInitiatedTransaction": ["customerAcceptance": false]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSUR
import Foundation
let headers = [
"X-IBM-Client-Id": "REPLACE_THIS_KEY",
"authorization": "REPLACE_THIS_VALUE",
"Signature": "REPLACE_THIS_VALUE",
"content-type": "application/json",
"accept": "application/json"
]
let parameters = [
"cardInfo": [
"PAN": "12312312",
"secureCode": "123",
"validationDate": "2031-12-31T00:00:00.000Z",
"cardholderName": "Test",
"createToken": false
],
"info": [
"deviceInfo": [
"browserAcceptHeader": "3528664295618797",
"browserJavaEnabled": "gujil",
"browserLanguage": "KH",
"browserColorDepth": "#efd663",
"browserScreenHeight": "apkajkitidodegew",
"browserScreenWidth": "1483526245449728",
"browserTZ": "pucillo",
"browserUserAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36",
"systemFamily": "lobizaj",
"systemVersion": "rikfa",
"systemArchitecture": "vammezmateh",
"deviceManufacturer": "imelavuthechie",
"deviceModel": "rozei",
"deviceID": "1881170266554368",
"applicationName": "Inez Jennings",
"applicationVersion": "netehimcuekamasl",
"geoLocalization": "tupegbavpajcucdi",
"ipAddress": "142.61.28.215",
"browserJavascriptEnabled": "112.180.181.6"
],
"customerInfo": [
[
"key": "lagoc",
"value": "47.92"
],
[
"key": "suovejaca",
"value": "52.57"
],
[
"key": "uwikownirtu",
"value": "44.44"
]
]
],
"actionProcessed": [
"id": "2321628436365312",
"type": "THREEDS_METHOD",
"executed": false
],
"tokenInfo": [
"tokenType": "Card",
"value": "89.07",
"secureCode": ""
],
"instalmentPlan": ["id": "111"],
"merchantInitiatedTransaction": ["customerAcceptance": false]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://sandbox.sibspayments.com/sibs/spg/v2/payments/REPLACE_ID/card/purchase")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
x
Example Response
POST https://sandbox.sibspayments.com/sibs/spg/v2/payments/{id}/card/purchase
{
"returnStatus": {
"statusCode": "000",
"statusMsg": "Success",
"statusDescription": "Ow dac enziferu nakuew nu cabcodak benlujsej ove boz lebuco co hekuidi lo uzzehti vanozijal."
},
"transactionID": "42f59038f3f14e618d091da8bf3b717e9999",
"merchant": {
"terminalId": "21451",
"channel": "web",
"merchantTransactionId": "863b730df285443f9a60ca404e0085fd1234"
},
"paymentType": "AUTH",
"actionResponse": {
"id": "1104561771118592",
"type": "THREEDS_METHOD",
"data": {
"url": "http://lemofug.su/zofnibbud",
"params": [
{
"name": "Frederick Burns",
"data": "besiaketi"
},
{
"name": "Blanche Hanson",
"data": "vizeckepid"
},
{
"name": "Sara Daniel",
"data": "cobvunazupk"
}
]
}
},
"tokenResponse": {
"tokenName": "a86f00f7a31f3efffa915b78c7088ceb88a50c44efe432c0318249b9da411d4a",
"tokenType": "Card",
"valu
{
"returnStatus": {
"statusCode": "000",
"statusMsg": "Success",
"statusDescription": "Ow dac enziferu nakuew nu cabcodak benlujsej ove boz lebuco co hekuidi lo uzzehti vanozijal."
},
"transactionID": "42f59038f3f14e618d091da8bf3b717e9999",
"merchant": {
"terminalId": "21451",
"channel": "web",
"merchantTransactionId": "863b730df285443f9a60ca404e0085fd1234"
},
"paymentType": "AUTH",
"actionResponse": {
"id": "1104561771118592",
"type": "THREEDS_METHOD",
"data": {
"url": "http://lemofug.su/zofnibbud",
"params": [
{
"name": "Frederick Burns",
"data": "besiaketi"
},
{
"name": "Blanche Hanson",
"data": "vizeckepid"
},
{
"name": "Sara Daniel",
"data": "cobvunazupk"
}
]
}
},
"tokenResponse": {
"tokenName": "a86f00f7a31f3efffa915b78c7088ceb88a50c44efe432c0318249b9da411d4a",
"tokenType": "Card",
"value": "60.71",
"maskedPAN": "ajogl",
"expireDate": "7/30/2064"
},
"merchantInitiatedTransaction": {
"status": "deindagfafwo"
},
"threeDSecure": {
"whitelistStatus": "E"
},
"execution": {
"startTime": "2020-07-15T12:10:49.131+01:00",
"endTime": "2020-07-15T12:10:49.131+01:00"
},
"paymentStatus": "Success",
"hmac": "ditzetpin"
}
x
Try this operation
No response. This is a mixed content call. It is not possible to test HTTP APIs from an HTTPS secured Portal site and vice versa.
No response. This is a cross-origin call. Make sure the server accepts requests from this portal. Or if using self-signed SSL certificates then paste the URL above into your browser to accept the certificate before trying again (On Internet Explorer it must be the same browser tab.).
Definitions
{
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string",
"example": "THREEDS_METHOD",
"enum": [
"THREEDS_METHOD",
"THREEDS_CHALLENGE",
"DCC"
],
"description": "Possible values are (\"TREEDS_METHOD\", \"THREEDS_CHALLENGE\", \"DCC\")."
},
"executed": {
"type": "boolean"
}
},
"additionalProperties": false
}
{
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string",
"example": "THREEDS_METHOD",
"enum": [
"THREEDS_METHOD",
"THREEDS_CHALLENGE",
"DCC"
]
},
"data": {
"$ref": "#/definitions/Data",
"description": "Depending on informed type related structures are specified below."
}
},
"additionalProperties": false
}
{
"properties": {
"PAN": {
"type": "string",
"example": "12312312"
},
"secureCode": {
"type": "string",
"example": "123"
},
"validationDate": {
"type": "string",
"format": "date-time",
"example": "2031-12-31T00:00:00.000Z"
},
"cardholderName": {
"type": "string",
"example": "Test"
},
"createToken": {
"type": "boolean",
"example": false
}
},
"additionalProperties": false
}
{
"properties": {
"url": {
"type": "string"
},
"params": {
"type": "array",
"items": {
"$ref": "#/definitions/Parameter"
}
}
},
"additionalProperties": false
}
Object that defines the customer device information.
{
"properties": {
"browserAcceptHeader": {
"type": "string",
"description": "Browser Accept Header"
},
"browserJavaEnabled": {
"type": "string",
"description": "Browser Java Enabled"
},
"browserLanguage": {
"type": "string",
"description": "Browser Language"
},
"browserColorDepth": {
"type": "string",
"description": "Browser Color Depth"
},
"browserScreenHeight": {
"type": "string",
"description": "Browser Screen Height"
},
"browserScreenWidth": {
"type": "string",
"description": "Browser Screen Width"
},
"browserTZ": {
"type": "string",
"description": "Browser Time Zone"
},
"browserUserAgent": {
"type": "string",
"description": "Browser User Agent"
},
"systemFamily": {
"type": "string",
"description": "System Family"
},
"systemVersion": {
"type": "string",
"description": "System Version"
},
"systemArchitecture": {
"type": "string",
"description": "System Architecture"
},
"deviceManufacturer": {
"type": "string",
"description": "Device Manufacturer"
},
"deviceModel": {
"type": "string",
"description": "Device Model"
},
"deviceID": {
"type": "string",
"description": "Device Unique Identification"
},
"applicationName": {
"type": "string",
"description": "Application Name"
},
"applicationVersion": {
"type": "string",
"description": "Application Version"
},
"geoLocalization": {
"type": "string",
"description": "Geolocation"
},
"ipAddress": {
"type": "string",
"description": "IP Address"
},
"browserJavascriptEnabled": {
"type": "string",
"description": "Browser Javascript Enabled"
}
},
"additionalProperties": false
}
Key value tuple.
{
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"key",
"value"
]
}
Object that defines the transaction additional information
{
"properties": {
"deviceInfo": {
"$ref": "#/definitions/Deviceinfo",
"description": "Object that defines the customers device predefined information. Check the DeviceInfo definition."
},
"customerInfo": {
"type": "array",
"items": {
"$ref": "#/definitions/ExtendedInfo"
},
"description": "Key Value tuple array."
}
},
"additionalProperties": false
}
Object that defines a Merchant.
{
"properties": {
"terminalId": {
"type": "integer",
"example": "21451",
"description": "Merchant terminal id",
"format": "int32"
},
"channel": {
"type": "string",
"description": "Merchant channel.",
"example": "web",
"maxLength": 3
},
"merchantTransactionId": {
"type": "string",
"description": "Id of the transaction in merchant store.",
"example": "863b730df285443f9a60ca404e0085fd1234",
"maxLength": 35
}
},
"additionalProperties": false
}
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"data": {
"type": "string"
}
},
"additionalProperties": false
}
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Instalment Plan Identification",
"maxLength": 3,
"pattern": "^[0-9]{1,3}$",
"default": "111"
}
},
"additionalProperties": false
}
{
"type": "object",
"properties": {
"tokenType": {
"type": "string",
"enum": [
"Email",
"MobilePhone",
"QRCodeMBWAY1",
"Card"
],
"default": "Card",
"description": "Token Type. Possible values are (\"Email\", \"MobilePhone\", \"QRCodeMBWAY\", \"Card\")"
},
"value": {
"type": "string",
"description": "Token value."
},
"secureCode": {
"type": "string",
"maxLength": 4,
"pattern": "^[0-9]{0,4}$"
}
},
"additionalProperties": false
}
{
"type": "object",
"properties": {
"tokenName": {
"type": "string",
"description": "Token Name"
},
"tokenType": {
"type": "string",
"description": "Token Type",
"enum": [
"Email",
"MobilePhone",
"QRCodeMBWAY1",
"Card"
],
"default": "Card"
},
"value": {
"type": "string",
"description": "Token Value"
},
"maskedPAN": {
"type": "string",
"description": "Masked PAN"
},
"expireDate": {
"type": "string",
"description": "Expiration Date"
}
},
"additionalProperties": false
}
{
"properties": {
"status": {
"type": "string",
"description": "Recurring Transaction Outcome. \\n Possible values are \"Success\", \"Decline\", \"Error\"."
}
},
"additionalProperties": false,
"required": [
"status"
]
}
{
"properties": {
"customerAcceptance": {
"type": "boolean",
"description": "Indicates if Customer has accepted the Merchant Initiated Transaction Service Terms and Conditions, in order to continue with the payment. Is set to 'True' if Merchant Initiated Transaction Terms and Conditions were presented by Merchant and explicitly accepted by Customer. Otherwise must set to 'False'. When not present, value 'False' is assumed."
}
},
"required": [
"customerAcceptance"
],
"additionalProperties": false
}
{
"properties": {
"whitelistStatus": {
"description": "Possible values are: \\n � Y = 3DS Requestor is whitelisted by cardholder \\n � N = 3DS Requestor is not whitelisted by cardholder \\n � E = Not eligible as determined by issuer \\n � P = Pending confirmation by cardholder \\n � R = Cardholder rejected \\n � U = Whitelist status unknown, unavailable, or does not apply.",
"type": "string",
"enum": [
"Y",
"N",
"E",
"P",
"R",
"U"
]
}
},
"required": [
"whitelistStatus"
]
}
Object that defines the payment operation request fields
{
"properties": {
"cardInfo": {
"$ref": "#/definitions/CardInfo",
"description": "Object that defines the card information. Check the CardInfo definition."
},
"info": {
"$ref": "#/definitions/Info",
"description": "Object that defines the aditional info provided by the merchant. Check the Info definition."
},
"actionProcessed": {
"description": "Action to be processed",
"$ref": "#/definitions/ActionProcessed"
},
"tokenInfo": {
"$ref": "#/definitions/TokenInfo"
},
"instalmentPlan": {
"description": "Instalment Plan",
"$ref": "#/definitions/InstalmentPlan"
},
"merchantInitiatedTransaction": {
"description": "Merchant Initiated Transaction",
"$ref": "#/definitions/MerchantInitiatedTransactionRequest"
}
},
"additionalProperties": false
}
{
"properties": {
"returnStatus": {
"description": "Describes the status of the request. (Attention: it doesn't describe the state of the transaction itself).",
"$ref": "#/definitions/ReturnStatus"
},
"transactionID": {
"type": "string",
"description": "Backend unique identify of the transaction.",
"example": "42f59038f3f14e618d091da8bf3b717e9999"
},
"merchant": {
"description": "Object that defines the Merchant. Check the Merchant definition.",
"$ref": "#/definitions/Merchant"
},
"paymentType": {
"type": "string",
"description": "Payment type used",
"enum": [
"AUTH",
"PURS",
"CAPT",
"CAUT",
"RFND",
"RCON",
"RVSL",
"STIQ",
"PREF",
"CPRF",
"CMBW"
],
"default": "AUTH"
},
"actionResponse": {
"description": "Action to perform",
"$ref": "#/definitions/ActionReponse"
},
"tokenResponse": {
"description": "Payment Tokens.",
"$ref": "#/definitions/TokenResponse"
},
"merchantInitiatedTransaction": {
"description": "Merchant Initiated Transaction Output.",
"$ref": "#/definitions/MerchantInitiatedTransactionStatusResponse"
},
"threeDSecure": {
"description": "Only present for 3DS 2.2 Transactions",
"$ref": "#/definitions/ThreeDSecureResponse"
},
"execution": {
"description": "Object that defines an Execution. See the Execution definition.",
"example": "",
"$ref": "#/definitions/Execution"
},
"paymentStatus": {
"type": "string",
"description": "Status of the payment.",
"enum": [
"Success",
"Partial",
"Declined",
"InProcessing",
"Pending",
"Timeout",
"Error"
],
"default": "Success"
},
"hmac": {
"type": "string",
"maxLength": 128,
"description": "For now, the type of HMAC used will be SHA2 (SHA512)."
}
},
"additionalProperties": false
}
Describes the status of the request. (Attention: it doesn't describe the state of the transaction itself).
{
"properties": {
"statusCode": {
"type": "string",
"description": "Identifier code of the processed transaction status.",
"example": "000"
},
"statusMsg": {
"type": "string",
"description": "Message of the processed transaction status.",
"example": "Success"
},
"statusDescription": {
"type": "string",
"description": "Description of the processed transaction status."
}
},
"additionalProperties": false,
"required": [
"statusCode",
"statusMsg",
"statusDescription"
]
}
Object that encapsulates technical execution information.
{
"properties": {
"startTime": {
"type": "string",
"description": "Time of the acceptance of the request by the API.",
"format": "date-time",
"example": "2020-07-15T12:10:49.131+01:00"
},
"endTime": {
"type": "string",
"description": "Time of the response to the request by the API.",
"format": "date-time",
"example": "2020-07-15T12:10:49.131+01:00"
}
},
"additionalProperties": false,
"required": [
"startTime",
"endTime"
]
}