- Created by user-e873e, last modified by Pooja on Oct 23, 2020
The Simple Credit Line Management System (SCLMS) provides a mechanism to create credit accounts for your account holders and manage limits for these accounts through APIs. These limits are used to transfer funds from Fintech's Funding Account to the account holder’s prepaid account when the account holder’s account is out of funds.
swagger: '2.0'
info:
version: ''
title: ''
tags:
- name: Credit account
- name: Credit audit log
paths:
'/api/v1/ifi/{ifiID}/credits/account':
post:
tags:
- Credit account
summary: Create credit account
description: Set up a credit account
operationId: createAccount
consumes:
- application/json
produces:
- application/json
parameters:
- name: ifiID
in: path
description: ID of the IFI.
required: true
type: integer
format: int64
- in: body
name: body
description: Specify the account and credit limit details in the request body.
required: false
schema:
$ref: '#/definitions/CreateAccountPayload'
responses:
'200':
description: successful operation
schema:
$ref: '#/definitions/AuditLogEntity'
'201':
description: ''
'/api/v1/ifi/{ifiID}/credits/account/{accountID}':
get:
tags:
- Credit account
summary: Get credit account
description: Retrieve credit details for an account.
operationId: getAccountById
produces:
- application/json
parameters:
- name: ifiID
in: path
description: ID of the IFI.
required: true
type: integer
format: int64
- name: accountID
in: path
description: ID of the Account whose credit details to be retrieved.
required: true
type: string
responses:
'200':
description: successful operation
schema:
$ref: '#/definitions/AccountEntity'
put:
tags:
- Credit account
summary: Update credit limit
description: Update credit limit of an account
operationId: changeAccountLimit
produces:
- application/json
parameters:
- name: ifiID
in: path
description: ID of the IFI.
required: true
type: integer
format: int64
- name: accountID
in: path
description: ID of the Account whose credit details to be updated.
required: true
type: string
- in: body
name: body
description: Update the credit limit in the request body.
required: false
schema:
$ref: '#/definitions/UpdateAccountPayload'
responses:
'200':
description: successful operation
schema:
$ref: '#/definitions/AccountEntity'
patch:
tags:
- Credit account
summary: Update credit account status
description: 'Update status of a credit account. Possible transition states to update the credit account status are: <ul><li>ACTIVE: Set credit limit as active to allow account holders to use the limit</li><li>INACTIVE: Set credit limit as temporarily inactive to disable account holders to use the limit</li> <li>DELETED: Set credit limit as permanently disabled</li></ul>'
operationId: updateAccountStatus
produces:
- application/json
parameters:
- name: ifiID
in: path
description: ID of the IFI.
required: true
type: integer
format: int64
- name: accountID
in: path
description: ID of the Account whose credit status to be updated.
required: true
type: string
- name: status
in: query
required: true
type: string
enum:
- ACTIVE
- INACTIVE
- DELETED
responses:
'200':
description: successful operation
schema:
$ref: '#/definitions/Void'
'204':
description: ''
'/api/v1/ifi/{ifiID}/credits/account/{accountID}/audit/logs':
get:
tags:
- Credit audit log
summary: Get all credit audit logs for a credit account
description: Retrieve the credit logs of a specific credit account under an IFI. Use `page` and `size` query parameters for a paginated view.
operationId: getAuditLogByAccountId
produces:
- application/json
parameters:
- name: ifiID
in: path
description: ID of the IFI.
required: true
type: integer
format: int64
- name: accountID
in: path
description: ID of the Account whose credit logs to be retrieved.
required: true
type: string
- name: page
in: query
description: Index of the page requested.
required: true
type: integer
format: int32
- name: size
in: query
description: Maximum number of results to be returned per request.
required: true
type: integer
format: int32
responses:
'200':
description: successful operation
schema:
type: array
items:
$ref: '#/definitions/AuditLogEntity'
'/api/v1/ifi/{ifiID}/credits/audit/logs':
get:
tags:
- Credit audit log
summary: Get all credit audit logs
description: Retrieve the details of credit logs of all credit accounts under an IFI. Use `page` and `size` query parameters for a paginated view.
operationId: getAuditLogByVboId
produces:
- application/json
parameters:
- name: ifiID
in: path
description: ID of the IFI.
required: true
type: integer
format: int64
- name: page
in: query
description: Index of the page requested.
required: true
type: integer
format: int32
- name: size
in: query
description: Maximum number of results to be returned per request.
required: true
type: integer
format: int32
responses:
'200':
description: successful operation
schema:
type: array
items:
$ref: '#/definitions/AuditLogEntity'
'/api/v1/ifi/{tenantID}/credits/account/{accountID}/decreaseCreditBalance':
post:
tags:
- Credit account
summary: Decrease Credit Limit Balance
description: ''
operationId: decreaseAccountBalance
produces:
- application/json
parameters:
- name: tenantID
in: path
required: true
type: integer
format: int64
- name: accountID
in: path
required: true
type: string
- in: body
name: body
required: false
schema:
$ref: '#/definitions/IdempotentDecreaseBalancePayload'
responses:
'200':
description: successful operation
schema:
$ref: '#/definitions/AccountEntity'
'/api/v1/ifi/{tenantID}/credits/account/{accountID}/increaseCreditBalance':
post:
tags:
- Credit account
summary: Increase Credit Limit Balance
description: ''
operationId: increaseAccountBalance
produces:
- application/json
parameters:
- name: tenantID
in: path
required: true
type: integer
format: int64
- name: accountID
in: path
required: true
type: string
- in: body
name: body
required: false
schema:
$ref: '#/definitions/IdempotentCreditBalancePayload'
responses:
'200':
description: successful operation
schema:
$ref: '#/definitions/AccountEntity'
definitions:
AccountEntity:
type: object
properties:
createdDate:
type: string
format: date-time
lastModifiedDate:
type: string
format: date-time
accountId:
type: string
format: uuid
creditLimit:
type: integer
format: int64
creditBalance:
type: integer
format: int64
status:
type: string
enum:
- ACTIVE
- INACTIVE
- DELETED
accountAttrs:
type: object
additionalProperties:
type: string
tenant:
$ref: '#/definitions/TenantEntity'
AuditLogEntity:
type: object
properties:
createdDate:
type: string
format: date-time
lastModifiedDate:
type: string
format: date-time
auditId:
type: integer
format: int64
openingCreditBal:
type: integer
format: int64
closingCreditBal:
type: integer
format: int64
openingCreditLimit:
type: integer
format: int64
closingCreditLimit:
type: integer
format: int64
paymentAttrs:
type: object
additionalProperties:
type: string
paymentId:
type: string
operation:
type: string
enum:
- ADD_NEW_ACCOUNT_WITH_CREDIT_LIMIT
- UPDATED_CREDIT_LIMIT_BY_USER
- CREDIT_BALANCE_USED
- CREDIT_BALANCE_INCREASED
accountId:
type: string
format: uuid
CreateAccountPayload:
type: object
properties:
accountId:
type: string
creditLimit:
type: integer
format: int64
status:
type: string
enum:
- ACTIVE
- INACTIVE
- DELETED
attrs:
type: object
additionalProperties:
type: string
CreditBalancePayload:
type: object
required:
- amount
- currency
properties:
amount:
type: integer
format: int64
currency:
type: string
DecreaseBalancePayload:
type: object
required:
- amount
- currency
- paymentID
properties:
paymentID:
type: string
amount:
type: integer
format: int64
currency:
type: string
Error:
type: object
properties:
details:
$ref: '#/definitions/JsonElement'
code:
type: string
Idempotent:
type: object
properties:
id:
type: string
format: uuid
content:
type: object
IdempotentCreditBalancePayload:
type: object
properties:
id:
type: string
format: uuid
content:
$ref: '#/definitions/CreditBalancePayload'
IdempotentDecreaseBalancePayload:
type: object
properties:
id:
type: string
format: uuid
content:
$ref: '#/definitions/DecreaseBalancePayload'
InterceptorPayload:
type: object
properties:
actionName:
type: string
enum:
- PAYMENT_REQUESTED
- PAYMENT_AUTHORIZATION_RECEIVED
- PAYMENT_REVERSAL_REQUESTED
payment:
$ref: '#/definitions/Payment'
JID:
type: object
properties:
appDomain:
type: string
serviceName:
type: string
nodeId:
type: string
resource:
type: string
primaryServiceName:
type: string
serviceViewName:
type: string
bareJID:
$ref: '#/definitions/JID'
serviceViewJID:
type: boolean
defaultServiceNode:
type: boolean
serviceInstanceJID:
type: boolean
jidOfAGroup:
type: boolean
proxyServiceJID:
type: boolean
JsonArray:
type: object
properties:
asBoolean:
type: boolean
asNumber:
$ref: '#/definitions/Number'
asDouble:
type: number
format: double
asFloat:
type: number
format: float
asLong:
type: integer
format: int64
asInt:
type: integer
format: int32
asByte:
type: string
format: byte
asCharacter:
type: string
asBigDecimal:
type: number
asBigInteger:
type: integer
asShort:
type: integer
format: int32
asString:
type: string
jsonPrimitive:
type: boolean
jsonNull:
type: boolean
jsonObject:
type: boolean
asJsonPrimitive:
$ref: '#/definitions/JsonPrimitive'
asJsonArray:
$ref: '#/definitions/JsonArray'
asJsonObject:
$ref: '#/definitions/JsonObject'
jsonArray:
type: boolean
asJsonNull:
$ref: '#/definitions/JsonNull'
JsonElement:
type: object
properties:
asBoolean:
type: boolean
jsonPrimitive:
type: boolean
jsonNull:
type: boolean
jsonObject:
type: boolean
asJsonPrimitive:
$ref: '#/definitions/JsonPrimitive'
asJsonArray:
$ref: '#/definitions/JsonArray'
asJsonObject:
$ref: '#/definitions/JsonObject'
jsonArray:
type: boolean
asJsonNull:
$ref: '#/definitions/JsonNull'
asNumber:
$ref: '#/definitions/Number'
asDouble:
type: number
format: double
asFloat:
type: number
format: float
asLong:
type: integer
format: int64
asInt:
type: integer
format: int32
asByte:
type: string
format: byte
asCharacter:
type: string
asBigDecimal:
type: number
asBigInteger:
type: integer
asShort:
type: integer
format: int32
asString:
type: string
JsonNull:
type: object
properties:
asBoolean:
type: boolean
jsonPrimitive:
type: boolean
jsonNull:
type: boolean
jsonObject:
type: boolean
asJsonPrimitive:
$ref: '#/definitions/JsonPrimitive'
asJsonArray:
$ref: '#/definitions/JsonArray'
asJsonObject:
$ref: '#/definitions/JsonObject'
jsonArray:
type: boolean
asJsonNull:
$ref: '#/definitions/JsonNull'
asNumber:
$ref: '#/definitions/Number'
asDouble:
type: number
format: double
asFloat:
type: number
format: float
asLong:
type: integer
format: int64
asInt:
type: integer
format: int32
asByte:
type: string
format: byte
asCharacter:
type: string
asBigDecimal:
type: number
asBigInteger:
type: integer
asShort:
type: integer
format: int32
asString:
type: string
JsonObject:
type: object
properties:
asBoolean:
type: boolean
jsonPrimitive:
type: boolean
jsonNull:
type: boolean
jsonObject:
type: boolean
asJsonPrimitive:
$ref: '#/definitions/JsonPrimitive'
asJsonArray:
$ref: '#/definitions/JsonArray'
asJsonObject:
$ref: '#/definitions/JsonObject'
jsonArray:
type: boolean
asJsonNull:
$ref: '#/definitions/JsonNull'
asNumber:
$ref: '#/definitions/Number'
asDouble:
type: number
format: double
asFloat:
type: number
format: float
asLong:
type: integer
format: int64
asInt:
type: integer
format: int32
asByte:
type: string
format: byte
asCharacter:
type: string
asBigDecimal:
type: number
asBigInteger:
type: integer
asShort:
type: integer
format: int32
asString:
type: string
JsonPrimitive:
type: object
properties:
number:
type: boolean
boolean:
type: boolean
asBoolean:
type: boolean
string:
type: boolean
asNumber:
$ref: '#/definitions/Number'
asDouble:
type: number
format: double
asFloat:
type: number
format: float
asLong:
type: integer
format: int64
asInt:
type: integer
format: int32
asByte:
type: string
format: byte
asCharacter:
type: string
asBigDecimal:
type: number
asBigInteger:
type: integer
asShort:
type: integer
format: int32
asString:
type: string
jsonPrimitive:
type: boolean
jsonNull:
type: boolean
jsonObject:
type: boolean
asJsonPrimitive:
$ref: '#/definitions/JsonPrimitive'
asJsonArray:
$ref: '#/definitions/JsonArray'
asJsonObject:
$ref: '#/definitions/JsonObject'
jsonArray:
type: boolean
asJsonNull:
$ref: '#/definitions/JsonNull'
Money:
type: object
properties:
currency:
type: string
amount:
type: integer
format: int64
Number:
type: object
Payment:
type: object
properties:
headers:
type: object
additionalProperties:
type: string
id:
type: integer
format: int64
ifi:
type: integer
format: int64
requestChannelType:
type: string
enum:
- ZETA_POS
- SUPER_CARD
- COLLECT_CARD
- COLLECT_CALL
- ZETA_PAYMENT_PAGE
- ZETA_USER_APP
- ZETA_API
- ZETA_EXPRESS_REMOTE
- ZETA_EXPRESS_KIOSK
- ZETA_SHADOW_CARD
- ZETA_UNKNOWN
- UPI
- VOID
- IMPS
- NEFT
state:
type: string
enum:
- VOID
- PAYMENT_REQUESTED
- PAYMENT_AUTHORIZATION_REQUESTED
- CHALLENGE_REQUIRED
- CHALLENGE_SUBMITTED
- PAYMENT_AUTHORIZATION_RECEIVED
- PAYMENT_EFFECTED
- PAYMENT_CAPTURED
- REVERSAL_INITIATED
- PAYMENT_REVERSED
- PAYMENT_REQUEST_CANCELLED
- PAYMENT_REQUEST_DECLINED
- PAYMENT_REQUEST_FAILED
- PAYMENT_DECLINED
- PAYMENT_FAILED
value:
$ref: '#/definitions/Money'
stateTransitions:
type: object
additionalProperties:
type: integer
format: int64
payer:
type: object
additionalProperties:
type: string
payee:
type: object
additionalProperties:
type: string
paymentRequest:
$ref: '#/definitions/PublicPaymentRequestWrapper'
receipts:
type: array
items:
$ref: '#/definitions/Receipt'
error:
$ref: '#/definitions/Error'
attributes:
type: object
additionalProperties:
type: string
Posting:
type: object
properties:
postingID:
type: string
ifi:
type: integer
format: int64
value:
$ref: '#/definitions/Money'
newBalance:
$ref: '#/definitions/Money'
instrumentType:
type: string
productType:
type: string
cardProgramID:
type: string
attributes:
type: object
additionalProperties:
type: string
coupons:
type: array
items:
$ref: '#/definitions/JsonObject'
PublicPaymentRequestWrapper:
type: object
properties:
paymentRequestID:
type: string
requestFrom:
type: string
requestTo:
type: string
value:
type: array
items:
$ref: '#/definitions/Money'
dueBy:
type: integer
format: int64
towards:
type: string
attributes:
type: object
additionalProperties:
type: string
Receipt:
type: object
properties:
headers:
type: object
additionalProperties:
type: string
receiptType:
type: string
enum:
- AUTHORIZATION
- PAYMENT
- REVERSAL
paymentID:
type: string
paymentRequestID:
type: string
receiptID:
type: integer
format: int64
transactionHash:
type: string
transactionCode:
type: string
paymentFrom:
type: string
paymentTo:
type: string
time:
type: integer
format: int64
debits:
type: array
items:
$ref: '#/definitions/Posting'
credits:
type: array
items:
$ref: '#/definitions/Posting'
towards:
type: string
attributes:
type: object
additionalProperties:
type: string
value:
$ref: '#/definitions/Money'
payerInfo:
type: object
additionalProperties:
type: string
payeeInfo:
type: object
additionalProperties:
type: string
reversedReceiptID:
type: integer
format: int64
type:
type: string
signatoryJID:
$ref: '#/definitions/JID'
zetaSignature:
$ref: '#/definitions/ZetaSignature'
payloadVersion:
type: integer
format: int32
signed:
type: boolean
signature:
type: string
SignatureAlgorithm:
type: object
properties:
id:
type: integer
format: int32
TenantEntity:
type: object
properties:
createdDate:
type: string
format: date-time
lastModifiedDate:
type: string
format: date-time
id:
type: integer
format: int64
tenantId:
type: integer
format: int64
tenantName:
type: string
vboId:
type: string
format: uuid
sandboxId:
type: integer
format: int64
policyConfig:
type: object
additionalProperties:
type: string
tenantConfig:
type: object
additionalProperties:
type: string
webHookConfig:
type: object
additionalProperties:
type: string
UpdateAccountPayload:
type: object
properties:
creditLimit:
type: integer
format: int64
Void:
type: object
ZetaSignature:
type: object
properties:
publicKeyID:
type: string
algoID:
type: integer
format: int32
signatureAlgorithm:
$ref: '#/definitions/SignatureAlgorithm'
signature:
type: array
items:
type: string
format: byte
- No labels