Skip to content

Shopping Loan API Integration

Authorization is required to access the API. Bearer Token is used for authorization.

Endpoint: /loans/authenticate Method: POST Content-Type: application/json

{
"username": "string",
"password": "string",
"merchantNo": 0,
"apiSecretKey": "string"
}
ParameterTypeDescriptionRequired
usernamestringMerchant API usernameRequired
passwordstringMerchant API passwordRequired
merchantNointegerMerchant numberRequired
apiSecretKeystringUnique key for the merchant (provided by Nkolay)Required
{
"token": "eyJhbGciOiJIUzUxMiJ9.eyJtZXJjaGFudF9ubyI6NDAwM..."
}

The received token value must be added to the Authorization header as Bearer in all subsequent API calls.

Example Authorization Header:

Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJtZXJjaGFudF9ubyI6NDAwM...

Returns the list of contracted banks. It is recommended to use this information to display banks on the end user’s screen.

Endpoint: /loans/v1/facilitate/query/banks Method: POST Content-Type: application/json

Body can be left empty:

{}
{
"banks": [
{
"countryId": "TR",
"code": "AKTIFBANK",
"type": "AKTIFBANK",
"name": "Aktif Bank",
"description": "Aktif Yatırım Bankası A.Ş.",
"active": true
}
]
}
ParameterTypeDescription
banksarray[object]List of banks
countryIdstringCountry ID
codestringBank code (used when starting a session)
typestringBank type
namestringBank name
descriptionstringBank description
activebooleanWhether the bank is active

Starts a new credit session for a specific bank. The referenceId value returned from this service will be used in subsequent API calls.

Endpoint: /loans/v1/facilitate/sessions/{bankCode} Method: POST Content-Type: application/json

ParameterTypeDescriptionExample
bankCodestring (path)Bank code (the code value obtained from Query Banks service)AKTIFBANK

Body can be left empty:

{}
{
"referenceId": "7b942ca7-7ecd-4b45-9581-855a6f5c4856"
}
ParameterTypeDescription
referenceIdstringCredit session reference ID. This ID will be used in payment simulation and pre-credit assessment services.

Simulates monthly payments for a specific credit amount and term. You can use this to show different installment options to your customer.

Endpoint: /loans/v1/facilitate/simulation/{bankSessionReferenceId} Method: POST Content-Type: application/json

ParameterTypeDescription
bankSessionReferenceIdstring (path)The referenceId value returned from the Start Bank Session operation
{
"maxTerm": 6,
"cart": {
"price": {
"itemsPrice": 20000.00,
"shippingPrice": 100.00,
"totalPrice": 20100.00
},
"items": [
{
"productName": "Product Name",
"categoryCode": "Category Code",
"quantity": 1,
"price": 20000.00,
"totalPriceWithoutDiscounts": 20000.00,
"totalPrice": 20000.00
}
]
}
}
ParameterTypeDescriptionRequired
maxTermintegerMaximum number of termsOptional
cartobjectShopping cart informationOptional
cart.priceobjectPrice informationRequired
cart.price.itemsPricenumberTotal price of itemsRequired
cart.price.shippingPricenumberShipping priceRequired
cart.price.totalPricenumberTotal price (items + shipping)Required
cart.itemsarray[object]List of items in cartRequired
cart.items[].productNamestringProduct nameRequired
cart.items[].categoryCodestringProduct category codeRequired
cart.items[].quantityintegerProduct quantityRequired
cart.items[].pricenumberUnit price of productOptional
cart.items[].totalPriceWithoutDiscountsnumberTotal price without discountsRequired
cart.items[].totalPricenumberTotal price with discountsRequired
{
"bankResponseCode": "0",
"bankResponseMessage": "Transaction Successful",
"success": true,
"monthlyPayments": [
{
"term": 3,
"amount": 7442.8,
"interestRate": 4.19,
"totalPaymentAmount": 22328.38,
"annualEffectiveInterestRate": 88.9774,
"monthlyEffectiveInterestRate": 7.4148
},
{
"term": 6,
"amount": 4016.84,
"interestRate": 4.19,
"totalPaymentAmount": 24101.05,
"annualEffectiveInterestRate": 88.9781,
"monthlyEffectiveInterestRate": 7.4148
}
]
}
ParameterTypeDescription
bankResponseCodestringBank response code (“0” = successful)
bankResponseMessagestringBank response message
successbooleanIndicates whether the operation was successful
monthlyPaymentsarray[object]List of monthly payment plans
monthlyPayments[].termintegerNumber of terms (months)
monthlyPayments[].amountnumberMonthly payment amount (TL)
monthlyPayments[].interestRatenumberInterest rate (%)
monthlyPayments[].totalPaymentAmountnumberTotal payment amount (TL)
monthlyPayments[].annualEffectiveInterestRatenumberAnnual effective interest rate (%)
monthlyPayments[].monthlyEffectiveInterestRatenumberMonthly effective interest rate (%)

Queries the customer’s pre-approved credit limit by sending customer and cart information. Calling this service is mandatory before making a loan application.

Endpoint: /loans/v1/facilitate/pre-approved/{bankSessionReferenceId} Method: POST Content-Type: application/json

ParameterTypeDescription
bankSessionReferenceIdstring (path)The referenceId value returned from the Start Bank Session operation
{
"nationalIdentityNumber": "12345678901",
"gsmNumber": "5551234567",
"orderId": "ORDER-12345",
"maxTerm": 6,
"cart": {
"price": {
"itemsPrice": 20000.00,
"shippingPrice": 100.00,
"totalPrice": 20100.00
},
"items": [
{
"productName": "Product Name",
"categoryCode": "Category Code",
"quantity": 1,
"price": 20000.00,
"totalPriceWithoutDiscounts": 20000.00,
"totalPrice": 20000.00,
"sellerExternalId": "SELLER-001",
"commissionRate": 1.00,
"withholdingTax": 0.10,
"marketplaceCost": 2.00
}
]
}
}
ParameterTypeDescriptionRequired
nationalIdentityNumberstringCustomer’s national ID number (11 digits)Required
gsmNumberstringCustomer’s phone number (5XXXXXXXXX format)Required
orderIdstringOrder number (must be unique)Required
maxTermintegerDesired maximum number of termsRequired
cartobjectCart informationRequired
cart.items[].sellerExternalIdstringSeller ID (for marketplace)Optional
cart.items[].commissionRatenumberCommission rate (%)Optional*
cart.items[].commissionAmountnumberCommission amount (TL)Optional*
cart.items[].withholdingTaxnumberWithholding taxOptional
cart.items[].marketplaceCostnumberMarketplace costOptional

Note: Only one of commissionRate and commissionAmount fields should be filled.

{
"success": true,
"referenceId": "50171152-66c5-4374-9f82-6a97c9e6d5d0",
"bankSuccess": true,
"bankResponseCode": "0",
"bankResponseMessage": "Transaction Successful",
"monthlyPayments": [
{
"term": 3,
"interestRate": 4.19,
"amount": 7442.8,
"totalPaymentAmount": 22328.38,
"annualEffectiveInterestRate": 88.9774,
"type": "CONSUMER_LOAN"
}
]
}
ParameterTypeDescription
successbooleanIndicates whether the operation was successful
referenceIdstringReference ID. This ID will be used in the loan application service.
bankSuccessbooleanIndicates whether it was approved by the bank
bankResponseCodestringBank response code
bankResponseMessagestringBank response message
monthlyPaymentsarray[object]Monthly payment plan (same format as Simulation service)
monthlyPayments[].typestringLoan type (e.g., CONSUMER_LOAN)

Follow this sequence to complete the shopping loan integration:

  1. Authentication - Get Bearer Token
  2. Query Banks - Get the list of banks to show to the customer
  3. Start Bank Session - Start a session for the selected bank
  4. Payment Simulation (Optional) - Show different term options
  5. Pre-Credit Assessment - Check customer’s credit eligibility
  6. Loan Application - Next step →