Checkout / Get status
Checkout API includes two operation:
Checkout Payment:
POST <ROOT_URL>/api/v2/paymentsCheckout Status:
GET <ROOT_URL>/api/v2/payments/{id}/statusTokenization
Token API:
POST <ROOT_URL>/api/v2/payments/{id}/token/purchaseFront office
SIBS Gateway form integration
Widget Endpoint: The <ROOT_URL> will depend on the environment where we are working.
| ROOT_URL QLY | https://api-qly.sibspayments.com |
| ROOT_URL PRD | https://api.sibspayments.com |
To be a valid Merchant on SIBS Gateway it will be necessary to have an authorisation token (<AuthToken>), <terminalId>.
Request API:
[POST] <ROOT_URL>/api/v2/payments Table – SIBS Gateway Form Integration
Request header
Authorisation: 'Bearer* <AuthToken>'
X-IBM-Client-Id: '<clientid**>'
Content-Type: 'application/json'´string (“AUTH”, “PURS”, “CAPT”, “CAUT”, “RFND”, “RCON”, “RVSL”, “STIQ”, “PREF”, “CPRF”, “CMBW”, “MAND”, “MAUT”, “MPUR”, “MITR”])
string ([“MBWAY”, “REFERENCE”, “CARD”, “TOKEN”, “STATIC”, “MANDATE”])
String
Value representing the browser language as defined in IETF BCP47
String
Required when Browser JavaScript Enable = True
Possible values:
([“1”, ”4”, “8”, “15”, “16”, “24”, “32”, “48”])
- 1 = 1 bit
- 4 = 4 bits
- 8 = 8 bits
- 15 = 15 bits
- 16 = 16 bits
- 24 = 24 bits
- 32 = 32 bits
- 48 = 48 bits
String (Maximum 6 Numeric Text)
Required when Browser JavaScript Enable = True
String (Maximum 6 Numeric Text)
Required when Browser JavaScript Enabled = true
String
Required when Browser JavaScript Enabled = true
Value is returned from the getTimezoneOffset() method
Examples:
If UTC -5 hours:
([“300”, “+300”])
If UTC +5 hours:
([“-300”])
string ([“ACTUAL”, “ESTIMATED”, “DEFAULT”])
If not present, the “DEFAULT” value is assumed.
If merchantInitiatedTransaction has MITType “UCOF”, the amountQualifier must be set to “ESTIMATED”.
Table notes
(1) Merchant: parameterization defined by the agreement between SIBS and the Merchant;
(2) Transaction: parameterization related to the transaction, “moto” is in the case of being a transition “Mail Order Telephone Order”. The paymentType is ‘AUTH’ or ‘PURS’;
(3) MerchantInitiatedTransaction: optional parameterization to create a transaction with Initial Cardholder Initiated Transaction;
(4) Tokenization: optional parameterization to create a transaction with Tokenization;
(5) Mandate: In Authorised Payment creation, mandateId is not present and mandateType must indicate type (“ONECLICK” or “SUBSCRIPTION”). In this case MandateCreationOnly can also be present. When MandateCreationOnly is present, “True” indicates “Only Creates Authorised Payment”, and “False” indicates “Creates Authorised Payment and requests payment”;
When Client requests a payment using an Authorised Payment previously created, mandateId must be filled in with the Authorised Payment Identification. In this case merchantType and MandateCreationOnly are not present.
Response (with success)
(5) transactionID: SIBS ID of transaction is used as the identifier of the transaction on the next APIs (<transactionID>);
(6) paymentMethodList: Payment methods available for the Merchant;
(7) formContext: Parameter to pass when building the SPG-form (Widget & Construction of SPG-form);
(8) mandate: mandateAvailable is set to ‘True’ if current Client has an active Authorised Payment for current Merchant and it is ready to be used. Attribute termsAndConditions indicates Merchant URI with Authorized Payment Terms & Conditions.
Widget construction
After a successfully request checkout, we can display the SPG-FORM, by adding a form with the class ‘paymentSPG’, and run “ROOT_URL/assets/js/widget.js?id=<transactionID>” script (Note that ROOT_URL is root URL depending on the environment). For the Merchant to have access to the SPG-FORM it is necessary to insert a form with the payment class in the DOM of Merchant HTML page with the following attributes:
- attr.spg-context: formContext (7) received from Checkout.
- attr.spg-config: configurations defined by the merchant (spg-config).
Widget construction
After a successfully request checkout, we can display the SPG-FORM, by adding a form with the class ‘paymentSPG’, and run “ROOT_URL/assets/js/widget.js?id=<transactionID>” script (Note that ROOT_URL is root URL depending on the environment). For the Merchant to have access to the SPG-FORM it is necessary to insert a form with the payment class in the DOM of Merchant HTML page with the following attributes:
- attr.spg-context: formContext (7) received from Checkout.
- attr.spg-config: configurations defined by the merchant (spg-config).
spg-style – Merchant Configurations : The attribute attr.spg-style is a JSON string, optional allowing the Merchant to customize the SPG-FORM:
SIBS Gateway style
| Parameter | Type | Possible values | Default | Description |
|---|---|---|---|---|
| LAYOUT | string | ‘default’, ‘accordion’, ‘list’ | ‘default’ | SPG Form Layout |
| THEME | string | ‘default’, ‘light’, ‘dark’, ‘grey’ | ‘default’ | SPG Form Theme |
| COLOR.PRIMARY | string | ‘#ff0000’ | – | Primary Color in Hexadeximal |
| COLOR.SECONDARY | string | ‘#ff0000’ | – | Secondary Color in Hexadeximal |
| COLOR.BORDER | string | ‘#ff0000’ | – | Border Color in Hexadeximal |
| COLOR.SURFACE | string | ‘#ff0000’ | – | Surface Color in Hexadeximal – surface is the ‘main background’ of the html page |
| COLOR.HEADER.TEXT | string | ‘#ff0000’ | – | Card Header Text Color in Hexadeximal |
| COLOR.HEADER.BACKGROUND | string | ‘#ff0000’ | – | Card Header Color in Hexadeximal |
| COLOR.BODY.TEXT | string | ‘#ff0000’ | – | Color in Hexadeximal of the Text in the Background |
| COLOR.BODY.BACKGROUND | string | ‘#ff0000’ | – | Background Color in Hexadeximal – background is the background of the payment cards |
| FONTE | string | ‘Times New Roman’ | – | Font family used |
{
layout?: 'default' | 'accordion' | 'list';
theme?: 'default' | 'light' | 'dark' | 'grey';
color?: {
primary?: string,
secondary?: string,
border?: string,
surface?: string,
header?:{
text?: string,
background?: string
}
body?: {
text?: string,
background?: string
}
},
font?: string
}Transaction Status Inquiry
When the checkout is finished, the Merchant will be redirected to a URL (or to the root of his own website), and, to check the transaction status, they need to do a new request to the API (Transaction Status Inquiry).
API
GET <ROOT_URL>/api/v2/payments/<transactionID(5)>/status Request header
Authorisation: ‘Bearer <AuthToken>’
X-IBM-Client-Id: ’<clientid>’ Body
string – Value representing the browser language as defined in IETF BCP47
string
Required when Browser JavaScript Enable = True
Possible values:
([“1”, “4”, “8”, “15”, “16”, “24”, “32”, “48”])
- 1 = 1 bit
- 4 = 4 bits
- 8 = 8 bits
- 15 = 15 bits
- 16 = 16 bits
- 24 = 24 bits
- 32 = 32 bits
- 48 = 48 bits
String (Maximum 6 Numeric Text)Required when Browser JavaScript Enable = True
String (Maximum 6 Numeric Text)
Required when Browser JavaScript Enabled = true
string
Required when Browser JavaScript Enabled = true
Value is returned from the getTimezoneOffset() method
Possible values, example:
If UTC -5 hours:
- 300
- +300
If UTC +5 hours:
- -300
(8) paymentStatus: payment status of the transaction;
(9) token: In case a token was requested, card token generated;
(10) paymentReference: In case a payment with reference (MULTIBANCO) has been requested, generated reference.
Server to Server Integration
Get Payment Modalities
API that will allow, in the checkout, receiving data regarding card payment modalities.
API
GET /sibs/spg/{version-id}/payment-modalities/{id}/list Request header
Authorisation: 'Bearer <AuthToken>'
X-IBM-Id: '<clientid>'
Content-Type: 'application/json'Path:
Id: <TransactionId>string (Maximum 256 Text)
([“Success”, “Partial”, “Declined”, “InProcessing”, “Pending”, “Timeout”, “Error”])
Complex types
Merchant
ReturnStatus
PaymentReference
ActionProcessed
ActionResponse
Backoffice
Merchant Initiated Transaction API
Merchant Initiated Transaction API
POST <ROOT_URL>/api/v2/payments/{original-tx-id}/mitWhen a successful transaction is generated as Initial Transaction (3), the Merchant will be able to perform Merchant Initiated Transaction payments.
APIs
[POST] <ROOT_URL>/api/v2/payments/< originalTransactionID (5)>/mit Request
Authorisation: 'Bearer <AuthToken>'
X-IBM-Client-Id: '<clientid>'
Content-Type: 'application/json'
HMAC: string 'Maximum 128 Base64 Text' (Optional)Request Header
(Original transaction id (Cardholder Initiated Transaction) to do future Merchant Initiated Transaction payments.)
Response (with success)
Capture API
POST <ROOT_URL>/api/v2/payments/{original-tx-id}/captureWhen a success transaction happens from an authorisation, it is possible to execute a capture.
API
[POST] <ROOT_URL>/api/v2/payments/< originalTransactionID (5)>/captureRequest
Authorisation: 'Bearer <AuthToken>'
X-IBM-Client-Id:'<clientid>'
Content-Type: 'application/json'
HMAC: 'String (Maximum 128 Base64 Text)' (optional)Request header
Response (with success)
String (Maximum 256 Text)
([“Success”, “Partial”, “Declined”, “InProcessing”, “Pending”, “Timeout”, “Error”])
string
([“AUTH”, “PURS”, “CAPT”, “CAUT”, “RFND”, “RCON”, “RVSL”, “STIQ”, “PREF”, “CPRF”, “CMBW”, “MAND”, “MAUT”, “MPUR”, “MITR”])
string
([“AUTH”, “PURS”, “CAPT”, “CAUT”, “RFND”, “RCON”, “RVSL”, “STIQ”, “PREF”, “CPRF”, “CMBW”, “MAND”, “MAUT”, “MPUR”, “MITR”])
string ([“Success”, “Partial”, “Declined”, “InProcessing”, “Pending”, “Timeout”, “Error”])
Cancellation API
POST <ROOT_URL>/api/v2/payments/{original-tx-id}/cancellationWhen a success transaction happens from an authorisation, it is possible to execute a cancellation.
API
[POST] <ROOT_URL>/api/v2/payments/< originalTransactionID (5)>/cancellation Request Header
Authorisation: ‘Bearer <AuthToken>’
X-IBM-Client-Id: ’<clientid>’
Content-Type: ‘application/json’ Body answer
Response (with success)
Body answer
Refund API
POST <ROOT_URL>/api/v2/payments/{original-tx-id}/refundWhen a success transaction happens from a capture or purchase, it is possible to execute a refund.
API
[POST] <ROOT_URL>/api/v2/payments/< originalTransactionID (5)>/refund Request header
Authorisation: ‘Bearer <AuthToken>’
X-IBM-Client-Id: ’<clientid>’
Content-Type: ‘application/json’
HMAC: string ‘Maximum 128 Base64 Text’ (Optional)Body answer
Response (with success)
Body answer