Cards
One-time purchase
Card payments are available for Visa and Mastercard cards, and since the flow may differ slightly depending on the exact use case, so, in this section we will describe the one-time purchase, but you can also have access to a couple of different 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.
Use the one-time purchase flow when you want to charge the shopper immediately.
Check below the available environments where you can perform a server-to-server POST request to generate the transaction.
Environment
URL
Operation Method & Endpoint
Operation Description
PROD
api.sibsgateway.com
POST
version-id/{id}/card/purchase
Requests the payment registered by the previous checkout using card details inserted by the customer.
CER
stargate-cer.qly.site[1|2].sibs.pt
POST
api/v1/payments/:transactionId/card/purchase
Requests the payment registered by the previous checkout using card details inserted by the customer.
Before you make the payment:
- The order has created and submitted
- The request needs an Authorisation Header with the transactionsignature returned on the order creation response
In this request, the Bearer Token is replaced by the checkout response transactionSignature
The message below represents the one-time purchase where the payment is performed immediately, and no additional services (3D Secure, tokenization, and one-click) are identified for calling.
Here is an example of how to make a one-time purchase.
What’s next?
Have a look at the other Card payment features you can use.
- Payment authorisation and subsequent charge only upon order delivery (total or partial)
- Payment authorisation with 3D Secure authentication (frictionless or challenged)
- Payment based on card tokenization
- Payment based on One-click card
After you make the payment, you will receive a response comprising a paymentStatus in the message. It informs whether the transaction was accepted, declined, still pending a final result, or requires additional action.
- Success: The purchase has been processed successfully and the customer has been debited.
- Declined: The purchase has been declined.
Request:
{
"merchant": {
"terminalId": 24,
"channel": "web",
"merchantTransactionId": "Order Id: srd5v98xn5",
"transactionDescription": "transaction short description",
"shopURL": "https://mytest.e-shop.pl/"
},
"transaction": {
"transactionTimestamp": "2023-05-12T09:17:50.531Z",
"description": "transaction statement description",
"moto": false,
"paymentType": "PURS",
"amount": {
"value": 50.5,
"currency": "PLN"
},
"paymentMethod": [
"CARD"
]
}
}
- Pending: The final result of the purchase is not yet known. You will need to inquiry on the status of this transaction until it reaches a final state, or you decide to cancel it.
- Partial: The purchase is partially accepted, but requires additional actions to the completed (e.g. 3D-Secure authentication). The actionResponse element is provided for instructions on how to proceed.
Get the payment status
Afterwards, once the payment has been processed, you can check the status of your transaction making a GET request.
The Authorisation HTTP header is set to the Bearer token as it was used in the initial Checkout.
Request URL: https://stargate-cer.qly.site1.sibs.pt/api/v1/payments/{transactionID}/status
Request Headers:
Autorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6I (...)
X-IBM-Client-Id: b4480347-9fc8-4790-b359-100a99c60ea3
Content-Type: application/json