To create and execute single merchant payments on behalf of BaaS Client, after selecting payment method, provider and language (all these parameters are optional, but recommended – to save clicks for your customer), you will need to call our Initiate Payment API. The purpose of this API is to receive commercial transactions to your Client’s account.
If request was successful, you will receive response with http code 201 and payment ID and redirect URL in response body. You have to redirect your customer to redirect URL to authorize a payment within their provider (bank or card issuer). Save payment ID for further status check.
"payment": {
"paymentId": "07400128-60a9-47cc-8c99-924cb079a32b",
"redirectUrl": "https://pay-stage.connectpay.com?key=c5781691-c81c-42f3-8290-ae11b07fe74c"
}
You can see the full sequence diagram below:
After authorization within their bank or issuer, Consumer will be redirected back to widget and will be presented with payment status information.
Sometimes, provider may not respond immediately with the final payment status information. In such cases, we will periodically check at Provider for final status and update payment information. Same way, you should periodically check payment status using Get payment details API . Or you can subscribe to our payment status notification events and wait for status change notification.
As a final step of the payment journey, by pressing the button Return to Merchant, Consumer will be redirected back to your website using the web address provided via redirectUrl
parameter in the Payment Initiation API request.
For testing only. When testing requests in the stage environment, please note that not all providers support the frontend. We recommend selecting these details while testing:
1. For DE country and PIS method – Fake Bank with Client Keys (enter it in search), provider ID c3e4f215-dde4-4d0c-9a48-bc7274c90977 . Test credentials:
User: username
Password: secret
Confirmation code: 123456
2. For LT country and PIS method – Siauliu bankas, provider ID a7640cb7-4dec-4a44-a9ad-b918c803254e
3. For CARD payment method, use card No 4242424242424242 for success result and No 4539467987109256 for failed result.
Splitting one payment for multiple
sub-merchants
For BaaS partners, it is possible to send 1 Card payment request on behalf of multiple merchants. This feature is used for marketplaces where end users can add multiple goods from different merchants through one platform’s website. One payment can have a maximum of 10 different merchants in the payment request. When sending a Payment Initiation API request, add an optional object splittingInstructions
with brand IDs representing merchants the user is paying for. You can add your own commission fee for each merchant. Currently, splittingInstructions
are supported if the payment method = Card.