Connect / Disconnect
The Connect process is the initial configuration of the payment gateway with a given account. This is a one-time operation that sets up the account with the payment gateway.
Connecting (or disconnecting) to the payment gateway is done under the payment setting page: Settings > Services > Payments.
Connect / Disconnect
Upon a Connect/Disconnect click event, we will open a dialog window and redirect to the application's connect/disconnect page. the b_uid and redirect_url query params will be appended to the URL.
{REDIRECT_URI}/connect?b_uid=BUSINESS_UID&redirect_url=REDIRECT_URL
User authorization
At that point it would most likely be the first interaction of the user with your payment gateway app, so we recommend that before loading any components to the connect page you'll first authorize the user so you can generate an access token for the user, and store it on your database, as this token will be required for all future API requests that will be made on behalf of the user or account.
For detailed information regarding authorizing users with inTandem please refer to the OAuth2 guide
Once the user has an access token generated, you can continue with the connect flow on your end. Once the Connect/Disconnect process ends on your side, you’ll need to update inTandem of the connect/disconnect event.
Connect
Update payment settings
POST https://api.vcita.biz/platform/v1/payment/settings
Request body payload:
{
"payment_settings": {
"external_{APP_NAME}_connected": true,
"payments_gateway_type": "{APP_NAME}",
"external_{APP_NAME}_params": {
"merchant_id": "{MERCHANT_ID}"
}
}
}
Response
status code 201
{
"status": "OK",
"data": {
"payment_settings": {
...,
...,
...
}
}
}
- “external_{APP_NAME}_connected”: true/false - connection status of your payment gateway (connected=true/disconnected=false)
- "payments_gateway_type": "APP-NAME" - sets the payment gateway as the default payment app
- "merchant_id": "MERCHANT_ID" - the merchant ID received from the payment gateway. This ID will be populated on your OP.
This request will update inTandem with the newly connected payment gateway app.
APP_NAME
the APP_NAME must the the application name (case sensitive), not the app code name.
Redirect and close connect window
Redirect to the URL that was passed to your connect page URL as the "redirect_url" query param, and append to it "?connect=true"
{redirect_url}?connect=true
Updating the UI
While the POST request updates the Connect status on the backend, the redirect URL updates the UI on the payment settings page.
Note - It is critical to send the POST request BEFORE redirecting back to the redirect URL
Disconnect
Update payment settings
POST https://api.vcita.biz/platform/v1/payment/settings
Request body payload:
{
"payment_settings": {
"external_{APP_NAME}_connected": false
}
}
- “external_{APP_NAME}_connected”: true/false - connection status of your payment gateway (connected=true/disconnected=false)
This request will update inTandem to disconnect the payment gateway app.
Redirect and close the disconnect window
Redirect to the URL that was passed to your disconnect page URL as the "redirect_url" query param, and append to it "?disconnect=true"
{redirect_url}?disconnect=true
Updated about 2 months ago