API Integration (Full-Code)
Utilize our APIs to receive payments, and create your own payment form to gain complete control over the appearance and user experience of your checkout page.
The following instructions explain how to accept payments.
Step 1: Create an order
This step describes how to create an order once your shopper is ready to pay.
The available endpoint destination URL:
Environment
URL
Operation Method & Endpoint
Operation Description
PROD
api.sibsgateway.com
POST
api/version-id/payments
Performs a request to prepare the checkout required data and returns with the Payment Form.
CER
stargate-{amb}.qly.site[1|2].sibs.pt
POST
api/version-id/payments
Performs a request to prepare the checkout required data and returns with the Payment Form.
Regarding the required data to create the order, the process is simple, and it requires only a few actions:
Action 1: Define the header and add merchant and customer information
Check below the full description of the required data to start creating your order.
Action 2: Add transaction information to your order
Now, it is time to include your transaction information based on the payment methods you want to render in your paywall.
Check here the instructions to:
- Perform an instant capture
- Perform a pre-authorized capture
Action 3: Complete your order including additional and optional information
In this step, we show you that there is plenty of optional information that you add to complete your order creation. Please check below the additional information based on some use cases:
Set up 3D Secure
Payment authorisation with 3D Secure authentication (frictionless or challenged).
Store cards
Save a shopper’s details and make recurring and subscription payments.
Use OneClick card
Activate the most seamless and quick way to accept payments.
Set up Webhooks
Keep your system up-to date on payment events and status changes.
Here is an example of how to create an order.
Request Body:
{
"merchant": {
"terminalId": 24,
"channel": "web",
"merchantTransactionId": "Order Id: 9bzraklk4v",
"transactionDescription": "transaction short description",
"shopURL": "https://mytest.e-shop.pl/"
},
"transaction": {
"transactionTimestamp": "2023-05-15T20:11:11.488Z",
"description": "transaction statement description",
"moto": false,
"paymentType": "PURS",
"amount": {
"value": 50.5,
"currency": "PLN"
},
"paymentMethod": [
"CARD",
"BLIK",
"PAY_BY_LINK"
]
}
}
Step 2: Get the response
The response includes a statusMsg, a transactionID, a transactionSignature and the list of available paymentMethodList that you can display.
Here’s an example of a successful response:
Request Checkout:
{
"returnStatus": {
"statusCode": "000",
"statusMsg": "Success",
"statusDescription": "string"
},
"transactionID": "42f59038f3f14e618d091da8bf3b717e9999",
"transactionSignature": "42f59038f3f14e618d091da8bf3b717e9999",
"amount": {
"value": 50.50,
"currency": "PLN"
},
"merchant": {
"terminalId": 47215,
"channel": "web",
"merchantTransactionId": "5351136",
"transactionDescription": "string",
"shopURL": "string",
"websiteAddress": "string"
},
"paymentMethodList": "",
"tokenList": []
}
The response contains a statusMsg that can assume different values:
Result Code
StatusMsg
Description
HTTP-200
Success
Success response
HTTP-400
Bad Request
The JSON payload is not matching the API definition or some mandatory HTTP headers are missing. Please check in API Market for the correct syntax.
HTTP-401
Unauthorized
On the Authorization, Bearer token is invalid/expired or not associated with the Terminal used. Please check in SIBS Backoffice under the Credentials if the token is valid and create a new one if needed.
HTTP-403
Forbidden
The ClientID set on the X-IBM-Client-Id HTTP header is not valid or does not possess a valid subscription to the API. Please check in SIBS Backoffice under the SPG APP 2.0 if the ClientID is correct. If the problem persists contact SIBS Gateway support for a ClientID reset.
HTTP-405
Method Not Allowed
The HTTP Method used is not matching any of the API definitions available. Please check in API Market for the correct HTTP Method.
HTTP-429
Too Many Requests
The API calls rate limit has been exceeded. Please check in API Market for information on the rate limits that apply to the API.
HTTP-500
Internal Server Error
The API call has failed… and its most likely on our side. You should retry the operation, and if the problem persists contact SIBS Gateway support for assistance.
HTTP-503
Service Unavailable
The API call is not currently available. Usually we are always on, but short availability issues may occur during scheduled maintenance.
Step 3: Make a payment
After you create and submit the order with the shopper’s payment details, and he chooses to pay with a payment method that requires a redirection, you need to make a payment request to SIBS Gateway.
Check the instruction on how to make payment with each type of payment method:
The response contains a statusMsg that can assume different values:
Cards
Card payments are available for Visa and Mastercard, providing customers with a convenient and secure payment method.
BLIK
The most popular mobile payment system in Poland. Convenient, safe, and allows instant payments.
PayByLink
Popular payment method that enables customers to conveniently pay for online shopping using their bank accounts.