Skip to content

Shopping Loan Application Management

Creates a loan application on behalf of the customer. Before calling this service, the Pre-Credit Assessment service must be called.

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

ParameterTypeDescription
preApprovedReferenceIdstring (path)The referenceId value returned from the Pre-Credit Assessment service
{
"nationalIdentityNumber": "12345678901",
"gsmNumber": "5551234567",
"orderId": "ORDER-12345",
"orderDate": "2025-12-24T10:30:00",
"totalTerm": 6,
"timeToLive": 1735041000,
"callbackUrl": "https://yourdomain.com/callback",
"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 numberRequired
gsmNumberstringCustomer’s phone number (5XXXXXXXXX format)Required
orderIdstringOrder number (must be unique)Required
orderDatestringOrder date (ISO 8601: YYYY-MM-DDTHH:mm:ss)Required
totalTermintegerSelected number of termsRequired
timeToLiveintegerApplication validity period (Unix timestamp)Required
callbackUrlstringURL where PaynKolay will send the application resultRequired
cartobjectCart information (same format as Pre-Approval Query)Required
cart.items[].sellerExternalIdstringSeller IDOptional
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": "81acf2ef-448c-43f3-978e-52757b4c621b",
"referenceCode": "REF123456",
"bankApproved": true,
"bankResponseCode": "0",
"bankResponseMessage": "Transaction Successful",
"bankRedirectionUrl": "https://dpuat.aktifbank.com.tr/WebCreditApi/WebCredit?ecommerceref=3bb0f009-d15c-4eee-b2a1-cbc3cd959381",
"paymentPlan": {
"lendingAmount": 20100,
"interestRate": 4.19,
"term": 6,
"totalPaymentAmount": 24101.05,
"annualEffectiveInterestRate": 88.9781,
"monthlyPayments": [
{
"term": 1,
"amount": 4016.84,
"dueDate": "2026-01-24T10:30:00"
},
{
"term": 2,
"amount": 4016.84,
"dueDate": "2026-02-24T10:30:00"
}
]
}
}
ParameterTypeDescription
successbooleanIndicates whether the operation was successful
referenceIdstringPaynKolay reference ID (used for application querying)
referenceCodestringPaynKolay reference code
bankApprovedbooleanIndicates whether it was approved by the bank
bankResponseCodestringBank response code
bankResponseMessagestringBank response message
bankRedirectionUrlstringBank’s redirection URL. The customer must be redirected to this URL.
paymentPlanobjectPayment plan information
paymentPlan.lendingAmountnumberLoan amount (TL)
paymentPlan.interestRatenumberInterest rate (%)
paymentPlan.termintegerNumber of terms (months)
paymentPlan.totalPaymentAmountnumberTotal payment amount (TL)
paymentPlan.annualEffectiveInterestRatenumberAnnual effective interest rate (%)
paymentPlan.monthlyPaymentsarray[object]Monthly payment details
paymentPlan.monthlyPayments[].termintegerInstallment number
paymentPlan.monthlyPayments[].amountnumberMonthly payment amount (TL)
paymentPlan.monthlyPayments[].dueDatestringPayment date (ISO 8601)
  1. Redirection: When the application is successful, you must redirect the customer to the bank’s page using the bankRedirectionUrl value.
  2. Callback: After the bank transaction is completed, PaynKolay will send a POST request to your callbackUrl address.
  3. referenceId: Save this value - it will be used to query the application status.

Queries the status of a specific loan application.

Endpoint: /loans/v1/facilitate/query/loan/{loanApplicationReferenceId} Method: GET

ParameterTypeDescription
loanApplicationReferenceIdstring (path)The referenceId value returned from the Loan Application operation
{
"loanApplication": {
"bankType": "AKTIFBANK",
"bankApplicationId": "BANK-APP-12345",
"referenceId": "81acf2ef-448c-43f3-978e-52757b4c621b",
"referenceCode": "REF123456",
"merchantNo": 4003,
"orderId": "ORDER-12345",
"nationalIdentityNumber": "12345678901",
"gsm": "5551234567",
"totalTerm": 6,
"type": "SHOPPING_LOAN",
"isApproved": true,
"timeToLive": 1735041000,
"bankRedirectionUrl": "https://...",
"applicationDate": "2025-12-24T10:30:00Z",
"orderDate": "2025-12-24T10:30:00Z",
"status": "APPROVED",
"merchantCallbackUrl": "https://yourdomain.com/callback",
"cart": {
"totalPrice": 20100,
"shippingPrice": 100,
"items": [
{
"categoryCode": "ELECTRONICS",
"name": "Product Name",
"quantity": 1,
"price": 20000,
"priceWithoutDiscounts": 20000
}
]
},
"paymentPlan": {
"lendingAmount": 20100,
"interestRate": 4.19,
"term": 6,
"totalPaymentAmount": 24101.05,
"totalRefundAmount": 0,
"annualEffectiveInterestRate": 88.9781,
"monthlyEffectiveInterestRate": 7.4148,
"monthlyPayments": [
{
"term": 1,
"amount": 4016.84,
"dueDate": "2026-01-24T10:30:00Z",
"details": "1st Installment"
}
]
}
}
}
StatusDescription
NEWNew application created
STARTEDApplication is being processed
FAILEDApplication failed
APPROVEDApplication approved
REJECTEDApplication rejected
CANCELLEDApplication cancelled
REFUNDEDFull refund made
REFUNDED_PARTIALPartial refund made
REFUNDED_ANOMALYRefund anomaly
TIMEOUTApplication timed out

Enables refunding of approved and used loans.

Endpoint: /loans/v1/facilitate/refund/{loanApplicationReferenceId} Method: POST Content-Type: application/json

ParameterTypeDescription
loanApplicationReferenceIdstring (path)The referenceId value returned from the Loan Application operation
{
"refundAmount": 1000.00,
"sellerList": [
{
"trxAmount": 1000.00,
"refundedCommissionAmount": 10.00,
"sellerExternalId": "SELLER-001",
"withholdingTax": 2.00
}
]
}
ParameterTypeDescriptionRequired
refundAmountnumberAmount to be refunded (minimum 0.01 TL)Required
sellerListarray[object]Seller-based refund information (for marketplace)Optional
sellerList[].trxAmountnumberTransaction amountOptional
sellerList[].refundedCommissionAmountnumberRefunded commission amountOptional
sellerList[].sellerExternalIdstringSeller IDOptional
sellerList[].withholdingTaxnumberWithholding taxOptional
{
"bankResponseCode": "0",
"bankResponseMessage": "Transaction Successful",
"bankReferenceId": "BANK-REF-789",
"referenceId": "REFUND-REF-456",
"success": true
}
ParameterTypeDescription
bankResponseCodestringBank response code (“0” = successful)
bankResponseMessagestringBank response message
bankReferenceIdstringBank reference number
referenceIdstringPaynKolay reference number
successbooleanIndicates whether the operation was successful
  • Full or partial refunds can be made
  • Refund amount cannot exceed the loan amount
  • After a refund operation, the application status is updated to REFUNDED or REFUNDED_PARTIAL

Enables reporting and listing of loans.

Endpoint: /loans/v1/facilitate/reporting Method: GET

ParameterTypeDescriptionRequired
startDatestringStart date (ISO 8601)Required
endDatestringEnd date (ISO 8601)Required
referenceIdstringTo filter a specific applicationOptional
statusesarray[string]Status filter (NEW, APPROVED, etc.)Optional
pageNumberintegerPage numberRequired
pageSizeintegerNumber of records per pageRequired
GET /loans/v1/facilitate/reporting?startDate=2025-12-01T00:00:00Z&endDate=2025-12-31T23:59:59Z&pageNumber=0&pageSize=20&statuses=APPROVED,REJECTED

Returns a paginated list of loan applications. Each application is in the same format as Query Application.


The API returns appropriate HTTP status codes and error messages for failed requests.

CodeDescription
200 OKOperation successful
201 CreatedA new resource was created
400 Bad RequestBad request (invalid parameters)
401 UnauthorizedAuthorization error (invalid token)
403 ForbiddenAccess denied
404 Not FoundResource not found
500 Internal Server ErrorServer error

Error messages are typically returned in JSON format:

{
"success": false,
"bankResponseCode": "99",
"bankResponseMessage": "Error message description",
"errorCode": "VALIDATION_ERROR",
"errorMessage": "Detailed error description"
}
ErrorCauseSolution
401 UnauthorizedToken invalid or expiredGet a new token
400 Bad RequestMissing or invalid parameterCheck request parameters
bankResponseCode != “0”Bank operation failedCheck bank error message
TIMEOUTOperation timed outRetry the application

Follow all the steps of the shopping loan integration in order:

POST /loans/authenticate
→ Get Token
POST /loans/v1/facilitate/query/banks
→ Get bank list and show to customer
Customer selects bank
POST /loans/v1/facilitate/sessions/{bankCode}
→ Get referenceId (bankSessionReferenceId)
POST /loans/v1/facilitate/simulation/{bankSessionReferenceId}
→ Show installment options to customer
Get national ID and phone number from customer
POST /loans/v1/facilitate/pre-approved/{bankSessionReferenceId}
→ Get referenceId (preApprovedReferenceId)
→ Check pre-approval status
POST /loans/v1/facilitate/application/{preApprovedReferenceId}
→ Get referenceId (loanApplicationReferenceId)
→ Redirect customer to bankRedirectionUrl
Customer completes transaction on bank page
→ PaynKolay sends result to callbackUrl
GET /loans/v1/facilitate/query/loan/{loanApplicationReferenceId}
→ Check application status
POST /loans/v1/facilitate/refund/{loanApplicationReferenceId}
→ Process refund

  • Store tokens securely
  • Use HTTPS (mandatory)
  • Encrypt customer information
  • Don’t hardcode API keys in source code
  • Cache tokens (until they expire)
  • Set appropriate timeout values
  • Use retry mechanism for error situations
  • Show clear error messages
  • Inform about transaction status
  • Use loading indicators
  • Design for mobile compatibility
  • Save referenceId values
  • Regularly check application statuses
  • Keep log records
  • Configure callback URL properly