/Create E-Commerce payment with SPLIT

/Create E-Commerce payment with SPLIT



Split is a function using which it is possible to divide the amount and transfer it to separate accounts.
The company has the option to additionally divide the amount transferred by it, to additionally divide the dynamic account number and also the amount, the bank will split the amount according to the data provided.

📘

/Create e-commerce payment with the split is the same as /Create e-commerce payment, but few parameters are changed, for example, extra and extra2 parameters are required, also not all payment methods are compatible.

❗️

To use the split function, you need to make a request and join the bank's program. Send a request through the company's Internet banking message.

Request Endpoint

https://api.tbcbank.ge/v1/tpay/payments

Authorization

Authorization Type

Description

Bearer Token

access-token should be added to Authorization header

Request Parameters

Header

Parameter

Type

Description

apikey

string

developer app API key

Body Parameters

Parameter

Type

Description

amount { } (required)

object

transaction amount

returnurl (required)

string

callback url to redirect user after finishing payment

extra (required)

string

The Extra field includes the IBAN number to whose account the amount should be transferred. It is necessary to follow the standard IBAN format, otherwise the transaction will not be created.
The account must be opened in TBC Bank.

extra2 (required)

string

The amount to be transferred is included in the specified IBAN in Extra2. (for example 10; 10.50; 10.50).
The amount deducted in this field should not exceed the full amount.

expirationMinutes

number

payment initiation expiration time in minutes.

methods

array

Only these payment methods are available to be passed when initiating TBC E-Commerce payment using split function:
-Web QR
-Pan (Payment with card)
-Internet Bank Login
-Apple Pay

Detailed description of the methods is described in the Classifications chapter/ Payment Methods

callbackUrl

string

when payment status changes to final status, POST request containing PaymentId in the body will be sent to given URL. In case of successful receipt of the request, the merchant must return the status code 200 and check the payment status through GET /payments/{payment-id} endpoint. Body example {"PaymentId":"6azzo13uw5u2116332"}
callbackUrl must be added on the merchant dashboard at ecom.tbcpayments.ge.
If callbackUrl parameter is not provided, system automatically takes the basic callbackUrl value from the merchant dashboard.
Please, verify that POST request is allowed at your callbackUrl from the following IP addresses:
193.104.20.44
193.104.20.45
185.52.80.44
185.52.80.45

preAuth

boolean

specify if preauthorization is needed for the transaction. if "true" is passed, amount will be blocked on the card and additional request should be executed by merchant to complete payment. To finalize authorization process, /v1/tpay/payments/:paymentId/completion endpoint should be used. Note, that Completion request can be initiated not later than 30 days from Preauthorization date. By default block is saved for 30 days, although some banks may have a different setting, so this setting depends on the card issuing bank (Isuer Bank).

The following values are allowed:
true, false

language

string

default language for payment page

The following values are allowed:
KA, EN

merchantPaymentId

string

Merchant-side payment identifier

skipInfoMessage

boolean

If true is passed, TBC E-Commerce info message will be skipped and customer will be redirected to merchant. If false is passed or this parameter isn’t passed at all, TBC E-Commerce info message will be shown and customer will be redirected to merchant.

saveCard

boolean

Specify if saving card funcion is needed. This function should be enabled for the merchant by bank. If true is passed, recId parameter should be returned in response, through this parameter merchant can execute payment by saved card - POST /payments/execution. Zero amount is allowed for this function. If card saving funtion is requested with preauthorization parameter=true, saved card execution method will be activated after preauthorization completion. WebQR, ApplePay and installments pay methods are not allowed for saving card request

If saveCard is true, at the moment of saving the card, you must give the amount and the account number which will be used for the next recurring payment.

saveCardToDate

string

The date until the card will be saved can be passed in following format "MMYY". If the saveCardToDate is not provided or data provided by the merchant exceeds card expiry , the system will automatically assign the SaveCardToDate value that will be equal to card expiry. The actual card save date must be verified by getting payment status after transaction completed with GET /payments/{payment-id}

description

string

Payment short description for clients, max length 30. This parameter will appear on the checkout page.

Complex Types Description

amount

Parameter

Type

Description

currency (required)

string

transaction currency (3 digit ISO code).
The following values are allowed:
GEL

total

number

total amount of payment
format: 0.00

subtotal

number

amount of purchase
format: 0.00

tax

number

amount of tax
format: 0.00

shipping

number

amount of shipping price
format: 0.00

Request Sample

{
    "amount": {
        "currency":"GEL",
        "total": 200,
        "subTotal": 0,
        "tax": 0,
        "shipping": 0
    },
    "returnurl":"test.ge/callback",
    "extra":"GE60TB4572261006330008",
    "extra2": "20";  
    "userIpAddress" : "127.0.0.1",
    "expirationMinutes" : "5",
    "methods" : [5, 7, 9],
    "callbackUrl":"https://test.ge", 
    "preAuth":true,
    "language":"EN",
    "merchantPaymentId": "P123123",
    "saveCard": true,
    "saveCardToDate": "1021"
}
curl --location --request POST "https://api.tbcbank.ge/v1/tpay/payments" \
    --header "Content-Type: application/json" \
    --header "apikey: lXcDL8JJiAN8Vjlu6NW3kNeceOQolwnF" \
    --header "Authorization: Bearer eyJhbGciOiJKSeriiIsImtpZCI6IjVFMjBGMzQ2RUY1RjU2ODkxQTIyRkUzQUVCRjAzMzlGMzVDNjk1QjYiLCJ0eXAiOiJKV1QiLCJ4NXQiOiJYaUR6UnU5ZlZva2FJdjQ2Nl9Bem56WEdsYlkifQ.eyJuYmYiOjE2MzE2NDQyNjEsImV4cCI6MTYzMTczMDY2MSwiaXNzIjoiaHR0cHM6Ly9hY2NvdW50c2FwaS50YmNiYW5rLmdlLyIsImF1ZCI6WyJodHRwczovL2FjY291bnRzYXBpLnRiY2JhbmsuZ2UvcmVzb3VyY2VzIiwicGF5bWVudGFwaSJdLCJjbGllbnRfaWQiOiI3MDAwMDAyIiwic2NvcGUiOlsicGF5bWVudGFwaSJdfQ.GNIaxgik-ElXrvXOky5_1D1YjEEX5CB3eQHKPwvdCNhB-HvblqZ78QSNJcl6qLfL8gRTd0x9ASCgXu2z2RQYJ-wls0V2IwrQ7p4WEU-ON9QnasOjZWgPeVAtZQC_zjH9DdmL1GiDTIHLErhKDGl3YtSGcvPKSvTpABWda6HvF7lNGlEK0SZxzzt1i1SkpAnQfzIO1ATEmKdM1EmWzp5ZaDk0cF-Wzfk_2CrQAGofc80GT64U8WOXvVOx1gVYmjzqYs71XCOqfQdySYBIc-tbUC6YIoeSPZfu1hpi33Gz40ig57t4jxeE7Jh--38ydO4AGEw8BdlLv534O0V3ZoOddg" \
    --data "{
    \"amount\": {
        \"currency\":\"GEL\",
        \"total\": 200,
        \"subTotal\": 0,
        \"tax\": 0,
        \"shipping\": 0
    },
    \"returnurl\":\"test.ge/callback\",
    \"extra\":\"GE60TB4572261006330008\",
    \"extra2\":\"20\",
    \"userIpAddress\" : \"127.0.0.1\",
    \"expirationMinutes\" : \"5\",
    \"methods\" : [5, 7, 9],
    \"callbackUrl\":\"https://test.ge\", 
    \"preAuth\":true,
    \"language\":\"EN\",
    \"merchantPaymentId\": \"P123123\",
    \"saveCard\": true,
    \"saveCardToDate\": \"1021\"
}
"

Response Parameters

Parameter

Type

Description

payId

string

payment id

status

string

payment status

The following values are allowed:
Created

currency

string

transaction currency (3 digit ISO code)

amount

number

transaction amount
format: 0.00

links

object

links

  • uri

string

url

  • method

string

method to use on URL

  • rel

string

action to use on URL

transactionId

string

transaction_id from UFC

recId

string

in case of recurring payment registration, recId of saved card. recId should be used for executing recurring payment.

preAuth

string

preauthorization status for given payment (true, false)

httpStatusCode

number

http status code

developerMessage

string

developer message for logging in local system

userMessage

string

error message for user

expirationMinutes

number

payment initiation expiration time in minutes.

Response Sample

"payId": "tpay-tbvqma2372015",
  "status": "Created",
  "currency": "GEL",
  "amount": 200,
  "links": [
    {
      "uri": "https://api.tbcbank.ge/v1/tpay/payments/tpay-tbvqma2372015",
      "method": "GET",
      "rel": "self"
    },
    {
      "uri": "https://tpay.tbcbank.ge/checkout/choose-payment-method/tpay-tbvqma2372015",
      "method": "REDIRECT",
      "rel": "approval_url"
    }
  ],
  "transactionId": null,
  "preAuth": true,
  "recId": "8715aBbB4314e7dC4f91482283988365a3c30822",
  "httpStatusCode": 200,
  "developerMessage": null,
  "userMessage": null
}

Error Response

In case of error, standard response in problem json will be returned.

Details can be found at Error Code Description.

Recipe


Did this page help you?