jCard REST API
Conventions
- All dates must be in the format
yyyy-MM-dd
Request Headers
Every Request must have the following Headers
-
version
-
consumer-id
-
timestamp
-
nonce
-
hash
Response
Every JSON response will have the following properties:
- success (boolean)
true
if the operation was properly processed by the system.false
otherwise.
And may have the following:
- error (string)
When ‘success’ is
false
, the errors’ descriptions will be included.
Echo ¶
Echo ¶
These simulated resources are available for testing purposes.
Echo GetGET/echo
This resource does not have any body (only the mandatory headers) and returns a JSON.
Example URI
Headers
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
200
Headers
Content-Type: application/json
Body
{
"success": true,
"version": "2.0.1-SNAPSHOT",
"revision": "e6114e4",
"timestamp": 1433356981132
}
Echo PostPOST/echo
This resource may receive any JSON as its body, which will be echoed back.
Besides the sent properties, it will include the mandatory property success
and error
if needed.
Example URI
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Body
{
"payload": 100
}
201
Headers
Content-Type: application/json
Body
{
"success": true,
"payload": 100
}
SysConfig ¶
SysConfig collection ¶
Get All SysConfigsGET/sysconfig
Returns all the available SysConfigs
Example URI
Headers
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
200
Headers
Content-Type: application/json
Body
{
"success": true,
"sysConfigs": [
{
"id": "perm.login",
"value": "Login",
"readperm": "login",
"writeperm": "admin"
},
{
"id": "perm.login",
"value": "Login",
"readperm": "login",
"writeperm": "admin"
}
]
}
403
Headers
Content-Type: application/json
Body
{
"success": false,
"errors": "invalid.permissions"
}
Post SysConfigPOST/sysconfig
You may create a new SysConfig using this action. It takes a JSON object with the following properties:
-
id (required, string)
-
value (string) - A description of the SysConfig
-
readperm
-
writeperm
Example URI
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Body
{
"id" : "perm.restapi"
"value" : "restapi"
"readperm" : "login"
"writeperm" : "admin"
}
Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "SysConfig",
"description": "A SysConfig to post",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"value": {
"type": "string"
},
"readPerm": {
"type": "string"
},
"writePerm": {
"type": "string"
}
},
"additionalProperties": false,
"required": [ "id","value","readPerm","writePerm"]
}
201
Headers
Content-Type: application/json
Body
{
"success": true
}
403
Headers
Content-Type: application/json
Body
{
"success": false,
"error": "invalid.permissions"
}
409
Headers
Content-Type: application/json
Body
{
"success": false,
"error": "already.exists"
}
Update a SysConfigPUT/sysconfig
You may update a new SysConfig using this action. It takes a JSON object with the following properties:
-
id (required, string)
-
value (string) - A description of the SysConfig
-
readperm
-
writeperm
Example URI
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Body
{
"id" : "perm.restapi"
"value" : "modified-restapi"
"readperm" : "login"
"writeperm" : "admin"
}
Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "SysConfig",
"description": "A SysConfig to post",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"value": {
"type": "string"
},
"readPerm": {
"type": "string"
},
"writePerm": {
"type": "string"
}
},
"additionalProperties": false,
"required": ["id"]
}
201
Headers
Content-Type: application/json
Body
{
"success": true
}
403
Headers
Content-Type: application/json
Body
{
"success": false,
"error": "invalid.permissions"
}
409
Headers
Content-Type: application/json
Body
{
"success": false,
"error": "not.exists"
}
SysConfig ¶
A SysConfig object has the following attributes:
-
id
-
value
-
writeperm
-
readperm
Get SysConfigGET/sysconfig/{id}/
Given an ID, returns the corresponding SysConfig
Example URI
- id
string
(required)The ID of the SysConfig in the form of a string
Headers
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
200
Headers
Content-Type: application/json
Body
{
"success": true,
"sysConfig": {
"id": "perm.login",
"value": "Login",
"readperm": "login",
"writeperm": "admin"
}
}
403
Headers
Content-Type: application/json
Body
{
"success": false,
"errors": "invalid.permissions"
}
409
Headers
Content-Type: application/json
Body
{
"success": false,
"errors": "invalid.sysconfig"
}
Delete SysConfigDELETE/sysconfig/{id}/
Given an ID, deletes the corresponding SysConfig
Example URI
- id
string
(required)The ID of the SysConfig in the form of a string
Headers
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
200
Headers
Content-Type: application/json
Body
{
"success" : true,
}
403
Headers
Content-Type: application/json
Body
{
"success": false,
"errors": "invalid.permissions"
}
409
Headers
Content-Type: application/json
Body
{
"success": false,
"errors": "invalid.sysconfig"
}
GL ¶
Transactions ¶
Post a transactionPOST/gl/transactions
Example URI
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Body
{
"detail": "Detail",
"entries": [
{
"amount": 4693.38,
"accountCode": "11.001.00",
"type": "credit",
"layer": 840
},
{
"amount": 4693.38,
"accountCode": "12.001.00",
"tags": "tag2",
"detail": "EntryDetail",
"type": "debit",
"layer": 840
}
],
"postDate": "2015-06-22",
"journalName": "jcard",
"tags": "tag1"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Transaction",
"description": "A transaction to post",
"type": "object",
"properties": {
"detail": {
"type": "string"
},
"postDate": {
"type": "string"
},
"journalName": {
"type": "string"
},
"tags": {
"type": "string"
},
"entries": {
"type": "array",
"items": {
"type": "object",
"properties": {
"amount": {
"type": "number"
},
"accountCode": {
"type": "string"
},
"tags": {
"type": "string"
},
"detail": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"debit",
"credit"
]
},
"layer": {
"type": "integer"
}
},
"required": [
"amount",
"accountCode",
"type"
]
},
"minItems": 2
}
},
"required": [
"postDate",
"journalName",
"entries"
],
"additionalProperties": false
}
201
Headers
Content-Type: application/json
Body
{
"success": true
}
Account Balance ¶
Get BalanceGET/gl/journals/{journalCode}/accounts/{accountCode}/balance{?layers,date}
Example URI
- journalCode
string
(required) Example: jcard- accountCode
string
(required) Example: 12.001.00- layers
string
(optional)Comma-separated string of layers
- date
string
(optional)Optional string with the date, in the form of “yyyy-MM-dd”
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
200
Body
{
"response": {
"date": "2015-07-06",
"accountCode": "20.001.001",
"balance": 157,
"layers": "840,1840",
"journalCode": "jcard"
},
"success": true
}
Account Statement ¶
Get Account StatementGET/gl/journals/{journalCode}/accounts/{accountCode}/statement{?layers,start,end}
Example URI
- journalCode
string
(required) Example: jcard- accountCode
string
(required) Example: 12.001.00- layers
string
(optional)Comma-separated string of layers
- start
string
(optional)Optional string with the starting date, in the form of “yyyy-MM-dd”
- end
string
(optional)Optional string with the ending date, in the form of “yyyy-MM-dd”
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
200
Body
{
"success": true,
"accountStatement": {
"accountCode": "20.001.001",
"entries": [
{
"postDate": "2014-06-01T12:00:00Z",
"detail": "Authorization 63",
"credit": 10,
"layer": 1840,
"reversalCount": 0
},
{
"postDate": "2014-06-01T12:00:00Z",
"detail": "Authorization 65",
"credit": 5,
"layer": 1840,
"reversalCount": 0
},
{
"postDate": "2014-06-01T12:00:00Z",
"detail": "Authorization 66",
"credit": 5,
"layer": 1840,
"reversalCount": 0
},
{
"postDate": "2014-06-01T12:00:00Z",
"detail": "Authorization 67",
"credit": 5,
"layer": 1840,
"reversalCount": 0
}
],
"credits": 157,
"debits": 0,
"initialBalance": 0,
"finalBalance": 157,
"journalCode": "jcard",
"start": "Sun Feb 01 00:00:00 UYT 1970",
"layers": [
840,
1840
],
"description": "Acquirer 001 Transactions",
"end": "Sun Jan 31 23:59:59 UYST 2100"
}
}
Charts ¶
Account Collection ¶
Create new AccountPOST/gl/charts/{chartName}/accounts
Example URI
- chartName
string
(required) Example: jcard
Headers
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Body
{
"code": "22.001.00",
"description": "a description",
"accountType": "credit",
"parentCode": "11.001",
"final": true
}
Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Account",
"description": "An account to post",
"type": "object",
"properties": {
"code": {
"type": "string"
},
"description": {
"type": "string"
},
"accountType": {
"enum": [
"debit",
"credit"
]
},
"tags": {
"type": "string"
},
"currencyCode": {
"type": "string"
},
"parentCode": {
"type": "string"
},
"final": {
"type": "boolean"
},
"expiration": {
"type": "string"
}
},
"required": [
"code",
"accountType",
"parentCode",
"final"
],
"additionalProperties": false
}
201
Body
{
"success": true
}
Login ¶
Login ¶
Login a CustomerPOST/login
Example URI
Headers
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Body
{
"wallet": "123456789",
"pin": "123456",
"geoLocation": {
"latitude": 33.1234,
"longitude": 56.1111
}
}
Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Login",
"type": "object",
"properties": {
"wallet": {
"type": "string"
},
"pin": {
"type": "string"
},
"geoLocation": {
"type": "object",
"properties": {
"latitude": {
"type": "number"
},
"longitude": {
"type": "number"
}
},
"required": [
"latitude",
"longitude"
],
"additionalProperties": false
}
},
"required": [
"wallet",
"pin"
],
"additionalProperties": false
}
201
Body
{
"success": true,
"secret": "95583420e1582b514dcdfb4a85437dc1a019c5bc31ada50597b4d6ec7781f38f",
"consumer": "c400ded2-f9cc-11e4-accc-3c15c2cf79f2"
}
Wallet ¶
Wallet ¶
Create a new WalletPOST/wallets
Example URI
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Body
{
"code": "1234567891"
}
Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Wallet",
"description": "A wallet to post",
"type": "object",
"properties": {
"code": {
"type": "string",
"pattern": "^[a-zA-Z0-9][-_a-zA-Z0-9]{0,63}$"
},
"cardProduct": {
"type": "string"
}
},
"required": [
"code"
],
"additionalProperties": false
}
201
Body
{
"success": true,
"id": 2201,
"pin": "123456"
}
Credit ¶
Add credit to a walletPOST/wallets/{walletCode}/credit{?dryRun}
Example URI
- walletCode
number
(required)The code of the wallet to add credit.
- dryRun
boolean
(optional)Indicates whether the transaction will be executed or not.
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Body
{
"amount": 200,
"currency": "840",
"description": "credit 10",
"rrn": "548715406820",
"type": "cashInA2W",
"realId": "111111111",
"geoLocation": {
"latitude": -33,
"longitude": 54.233023
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Wallet Credit",
"description": "Credit to a wallet",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"amount": {
"type": "number"
},
"currency": {
"type": "string",
"pattern": "^[0-9]{1,4}$"
},
"rrn": {
"type": "string",
"description": "Alphanumeric string, length 12",
"pattern": "^[a-zA-Z0-9]{1,12}$"
},
"geoLocation": {
"type": "object",
"properties": {
"latitude": {
"type": "number"
},
"longitude": {
"type": "number"
}
},
"required": [
"latitude",
"longitude"
],
"additionalProperties": false
},
"financialEntityData": {
"type": "object",
"properties": {
"entityId": {
"type": "string",
"maxLength": 3
},
"entityCustomerAccount": {
"type": "string",
"maxLength": 25
},
"entityCustomerMaskedCard": {
"type": "string"
}
},
"required": [
"entityId",
"entityCustomerAccount"
]
},
"interface": {
"type": "string"
},
"address": {
"type": "string"
},
"type": {
"type": "string"
},
"realId": {
"type": "string"
},
"birthDate": {
"type": "string"
},
"phone": {
"type": "string"
},
"posAtmCode": {
"type": "string",
"maxLength": 12
},
"posAtm": {
"type": "string",
"description": "Alphanumeric string, length 8",
"pattern": "^[a-zA-Z0-9]{1,8}$"
}
},
"required": [
"amount",
"currency",
"rrn",
"type"
],
"additionalProperties": false
}
200
Body
{
"fees": [
{
"amount": 10,
"type": "cashAdvance.flat.840",
"account": "31.001.00"
}
],
"success": true,
"amountWithFees": 20
}
Debit ¶
Debit from a walletPOST/wallets/{walletCode}/debit{?dryRun}
Example URI
- walletCode
number
(required)The code of the wallet to debit from.
- dryRun
boolean
(optional)Indicates whether the transaction will be executed or not.
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Body
{
"amount" :10.00,
"currency" : "600,3600",
"description": "debit 10",
"rrn" : "561408221870",
"financialEntityData" : {
"entityId" : "12232111",
"entityCustomerAccount" : "12232323"
},
"realId" : "11111111",
"birthDate" : "1990-04-31"
"type" : "creditBankAccountW2A"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Wallet Debit",
"description": "Debit to a wallet",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"amount": {
"type": "number"
},
"currency": {
"type": "string",
"description" : "comma-separated string of layers"
},
"rrn": {
"type": "string",
"description": "Alphanumeric string, length 12",
"pattern": "^[a-zA-Z0-9]{1,12}$"
},
"geoLocation": {
"type": "object",
"properties": {
"latitude": {
"type": "number"
},
"longitude": {
"type": "number"
}
},
"required": [
"latitude",
"longitude"
],
"additionalProperties": false
},
"financialEntityData" : {
"type" : "object",
"properties" : {
"entityId" : { "type" : "string", "maxLength" : 3 },
"entityCustomerAccount" : { "type" : "string", "maxLength" : 25 }
},
"required" : ["entityId", "entityCustomerAccount"]
},
"operationAdditionalInfo" : {
"type" : "object",
"properties" : {
"serviceName" : { "type" : "string" },
"customerData" : {"type" : "string"}
}
},
"posAtm" : { "type" : "string",
"description": "Alphanumeric string, length 8",
"pattern": "^[a-zA-Z0-9]{1,8}$"
},
"type" : { "type" : "string"},
"pin" : { "type" : "string"},
"posAtmCode" : { "type" : "string", "maxLength" : 12},
"realId" : { "type" : "string" },
"birthDate" : { "type" : "string" },
"interface" : { "type" : "string" }
},
"required": [
"amount",
"currency",
"rrn",
"type"
],
"additionalProperties": false
}
200
Body
{
"fees": [
{
"amount": 10,
"type": "creditBankAccountW2A.flat.840",
"account": "31.001.00"
}
],
"success": true,
"amountWithFees": 20
}
Balance ¶
Get a wallet's balanceGET/wallets/{walletCode}/balance{?date,layers}
Example URI
- walletCode
number
(required)The code of the wallet to debit from.
- layers
string
(required)Comma-separated string of layers
- date
string
(optional)Optional string with the date, in the form of “yyyy-MM-dd”
Headers
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
201
Body
{
"success": true,
"balance": "300.00"
}
CashOut Balance ¶
Get a wallet's cashOut balanceGET/wallets/{walletCode}/cashOutBalance{?date,layers,type}
Example URI
- walletCode
number
(required)The code of the wallet to debit from.
- type
string
(required)The transaction type to calculate the right fees.
- layers
string
(required)Comma-separated string of layers
- date
string
(optional)Optional string with the date, in the form of “yyyy-MM-dd”
Headers
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
201
Body
{
"success": true,
"balance": "300.00"
}
Statement ¶
Get a wallet's 'mini' statementGET/wallets/{walletCode}/statement{?layers,length}
Returns the entries ordered by most recent first.
Example URI
- walletCode
number
(required)The code of the wallet to debit from.
- layers
string
(required)Comma-separated string of layers
- length
number
(optional)Number indicating the amount of entries wanted. If not specified, the length will be 5.
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
200
Body
{
"success": true,
"walletStatement": {
"accountCode": "23.1458743035773",
"description": "Wallet: 1458743035773",
"journalCode": "jcard",
"credits": 200,
"debits": 20,
"start": "2016-03-23 11:23:55.982",
"end": "2016-03-23 11:23:56.179",
"initialBalance": 0,
"finalBalance": 180,
"entries": [
{
"postDate": "2016-03-23T14:23:56Z",
"detail": "transfer 10.00Debit",
"layer": 840,
"debit": 10,
"balance": 180,
"tags": "cashIn",
"wallet1": "1458743035773",
"wallet2": "3692955",
"rrn": "816179581350",
"fees": 0,
"reversalCount": 0
},
{
"postDate": "2016-03-23T14:23:56Z",
"detail": "Test. Debit 10 from 840,3600Debit",
"layer": 840,
"debit": 10,
"balance": 190,
"tags": "creditBankAccountW2A",
"wallet1": "1458743035773",
"rrn": "612144478600",
"fees": 0,
"reversalCount": 0
},
{
"postDate": "2016-03-23T14:23:55Z",
"detail": "Test. Credit 200 on 840Credit",
"layer": 840,
"credit": 200,
"balance": 200,
"tags": "cashInA2W",
"geoLocation": {
"latitude": -33,
"longitude": 54.233023
},
"wallet1": "1458743035773",
"rrn": "826457403070",
"fees": 0,
"reversalCount": 0
}
],
"layers": [
840,
1840
]
}
}
Transactions ¶
Get a list of a wallet's tranlog entriesGET/wallets/{walletCode}/transactions{?start,end,length,itc,asc}
Returns the TranLog entries of a specified wallet.
Example URI
- walletCode
number
(required)The code of the wallet to debit from.
- itc
string
(optional)Comma-separated string of ITCs that should be included, the rest will be filtered out.
- length
number
(optional)Number indicating the amount of entries wanted. If not specified, the length will be 5.
- start
date
(optional)Start date (yyyy-MM-dd)
- end
date
(optional)End date (yyyy-MM-dd)
- asc
boolean
(optional)True if entries should be ordered by ID ascending, else it will be descending (last first).
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
200
Body
{
"success": true,
"transactions": {
"accountCode": "23.1001",
"description": "Wallet: 1001",
"journalCode": "jcard",
"start": "Mon Jan 01 00:00:00 ART 2018",
"end": "Tue Jul 10 00:00:00 ART 2018",
"tranlogs": [
{
"date": "2018-05-04 16:17:54",
"amount": 18205,
"wallet1": "1001",
"wallet2": "0995195557",
"typeDescription": "Load - Wallet to Wallet",
"rrn": "5RVEWSK2323HA",
"geoLocation": {
"latitude": -25.2957999,
"longitude": -57.5691327
},
"ssData": "P2PCashIn",
"itc": "wtransfer",
"customer2": "UNKNOWN UNKNOWN",
"id": 599387,
"irc": "0003",
"additionalData": {
"jsonRequest": {
"amount": 18205,
"currency": "3600",
"description": "Load of money from wallet",
"rrn": "5RVEWS233EHA",
"geoLocation": {
"latitude": -25.2957999,
"longitude": -57.5691327
},
"type": "P2PCashIn"
},
"typeDescription": "Load - Wallet to Wallet",
"subsidy": "242"
},
"currencyCode": "600",
"reversalCount": 0
},
{
"date": "2018-05-04 16:17:53",
"amount": 95828,
"wallet1": "1001",
"wallet2": "0968893383",
"typeDescription": "Load - Wallet to Wallet",
"rrn": "IKUXXWEYBBNQ",
"geoLocation": {
"latitude": -25.2957999,
"longitude": -57.5691327
},
"ssData": "P2PCashIn",
"itc": "wtransfer",
"customer2": "UNKNOWN UNKNOWN",
"id": 599386,
"irc": "0003",
"additionalData": {
"jsonRequest": {
"amount": 95828,
"currency": "3600",
"description": "Load of money from wallet",
"rrn": "IKUXXWEYBBNQ",
"geoLocation": {
"latitude": -25.2957999,
"longitude": -57.5691327
},
"type": "P2PCashIn"
},
"typeDescription": "Load - Wallet to Wallet",
"subsidy": "1275"
},
"currencyCode": "600",
"reversalCount": 0
}
]
}
}
Detail ¶
Get a wallet's full statementGET/wallets/{walletCode}/detail{?layers,start,end,order}
Returns the entries between start and end date (or all of them) chronologically ordered.
Example URI
- walletCode
number
(required)The code of the wallet to debit from.
- layers
string
(required)Comma-separated string of layers.
- start
string
(optional)Start date.
- end
string
(optional)End date.
- order
string
(optional)asc/desc. Ascending or descending order by id.
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
200
Body
{
"walletDetail": {
"accountCode": "23.1458743035773",
"description": "Wallet: 1458743035773",
"journalCode": "jcard",
"credits": 200,
"debits": 20,
"start": "Sun Feb 01 00:00:00 UYT 1970",
"end": "Sun Jan 31 23:59:59 UYST 2100",
"initialBalance": 0,
"finalBalance": 180,
"entries": [
{
"postDate": "2016-03-23T14:23:55Z",
"detail": "Test. Credit 200 on 840Credit",
"layer": 840,
"credit": 200,
"balance": 200,
"tags": "cashInA2W",
"geoLocation": {
"latitude": -33,
"longitude": 54.233023
},
"wallet1": "1458743035773",
"rrn": "826457403070",
"fees": 0,
"reversalCount": 0
},
{
"postDate": "2016-03-23T14:23:56Z",
"detail": "Test. Debit 10 from 840,3600Debit",
"layer": 840,
"debit": 10,
"balance": 190,
"tags": "creditBankAccountW2A",
"wallet1": "1458743035773",
"rrn": "612144478600",
"fees": 0,
"reversalCount": 0
},
{
"postDate": "2016-03-23T14:23:56Z",
"detail": "transfer 10.00Debit",
"layer": 840,
"debit": 10,
"balance": 180,
"tags": "cashIn",
"wallet1": "1458743035773",
"wallet2": "3692955",
"rrn": "816179581350",
"fees": 0,
"reversalCount": 0
}
],
"layers": [
840,
1840
]
},
"success": true
}
Transfer ¶
Transfer from wallet to walletPOST/wallets/{sourceWalletCode}/transfer{?dryRun}/{destinationWalletCode}
Example URI
- sourceWalletCode
number
(required)The code of the wallet to debit from.
- destinationWalletCode
number
(required)The code of the wallet to transfer to.
- dryRun
boolean
(optional)Indicates whether the transaction will be executed or not.
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Body
{
"amount" : 10.00,
"currency" : "840",
"description" : "A description",
"rrn" : "1234abc",
"realId" : "111111111"
"geoLocation" : {
"latitude" : 34.8836,
"longitude" : 56.1819
},
"pin": "123456",
"type" : "P2PRemittances"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Wallet Transfer",
"description": "Transfer from wallet to wallet",
"type": "object",
"properties": {
"description": {
"type": "string"
},
"amount": {
"type": "number"
},
"currency": {
"type": "string",
"description" : "comma-separated string of layers"
},
"rrn": {
"type": "string",
"description": "Alphanumeric string, length 12",
"pattern": "^[a-zA-Z0-9]{1,12}$"
},
"geoLocation": {
"type": "object",
"properties": {
"latitude": {
"type": "number"
},
"longitude": {
"type": "number"
}
},
"required": [
"latitude",
"longitude"
],
"additionalProperties": false
},
"thirdPartyNetwork" : {
"type" : "object",
"properties": {
"tradeName" : { "type" : "string"},
"tradeContact" : { "type" : "string" },
"netVoucher" : { "type" : "string" }
},
"required" : ["tradeName","tradeContact"]
},
"agentId" : {"type" : "string" },
"realId" : { "type" : "string" },
"birthDate" : { "type" : "string" },
"phone" : { "type" : "string" },
"pin" : { "type" : "string"},
"interface" : { "type" : "string" },
"type" : { "type" : "string" }
},
"required": [
"amount",
"currency",
"rrn",
"type"
],
"additionalProperties": false
}
200
Body
{
"fees": [
{
"amount": 10,
"type": "cashAdvance.flat.840",
"account": "31.001.00"
}
],
"success": true,
"amountWithFees": 20
}
Wallet Customer ¶
Get a wallet's customerGET/wallets/{walletCode}/customer
Example URI
- walletCode
number
(required)The code of the customer wallet
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
200
Body
{
"success": true,
"customer": {
"zip": "11222",
"lastName": "Doe",
"country": "Kingdom of Jane",
"notes": null,
"gender": null,
"institutionId": "00000000001",
"endDate": "2016-12-25",
"address2": null,
"city": "Janeopolis",
"address1": "Jane St. 1234",
"birthDate": "1992-12-11",
"firstName": "Jane",
"phone": "123456789",
"lastName2": "Foo",
"middleName": null,
"id": 5379,
"state": "JN",
"realId": "1438723783266",
"startDate": "2014-12-25",
"email": "jane@janedoe.com",
"honorific": null
}
}
Link a wallet to a customerPUT/wallets/{walletCode}/link
Link a wallet to a customer.
The customer MUST be specified by its realId
in the JSON object, and MUST exist.
If the wallet already belongs to a different customer, then an error will be thrown.
Example URI
- walletCode
number
(required)The code of the customer wallet
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Body
{
"realId": "1111"
}
Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Wallet Link",
"description": "Link a Wallet to a Customer",
"type": "object",
"properties": {
"realId": {
"type": "string"
}
},
"required": [
"realId"
],
"additionalProperties": false
}
201
Body
{
"success": true
}
Update a wallet's customerPUT/wallets/{walletCode}/customer
The wallet must already be linked to a customer in order to be able to update the customer’s data.
Example URI
- walletCode
number
(required)The code of the customer wallet
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Body
{
"realId": "1111",
"firstName": "Modified"
}
Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "CardHolder",
"description": "CardHolder put",
"type": "object",
"properties": {
"realId": {
"type": "string"
},
"active": {
"type": "boolean"
},
"startDate": {
"type": "string"
},
"endDate": {
"type": "string"
},
"honorific": {
"type": "string"
},
"gender": {
"enum": [
"f",
"m"
]
},
"firstName": {
"type": "string"
},
"middleName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"lastName2": {
"type": "string"
},
"email": {
"type": "string"
},
"address1": {
"type": "string"
},
"address2": {
"type": "string"
},
"city": {
"type": "string"
},
"state": {
"type": "string"
},
"zip": {
"type": "string"
},
"country": {
"type": "string"
},
"birthDate": {
"type": "string"
},
"notes": {
"type": "string"
},
"phone": {
"type": "string"
}
},
"additionalProperties": false
}
201
Body
{
"success": true
}
Owner ¶
Get owner's typeGET/wallets/{walletCode}/type
Example URI
- walletCode
number
(required)The code of the customer wallet
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
200
Body
{
"wallet": {
"type": "customer",
"id": "1441994047036"
},
"success": true
}
Change Pin ¶
Change PinPUT/wallets/{walletCode}/changepin
Example URI
- walletCode
number
(required)The code of the customer wallet
Headers
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Body
{
"pin": "143871378"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Pin",
"description": "Pin Reset",
"type": "object",
"properties": {
"pin": {
"type": "string",
"minLength": 4,
"pattern": "^[0-9]*$"
}
},
"required": [
"pin"
],
"additionalProperties": false
}
200
Body
{
"success": true
}
Block wallet ¶
Block a wallet, given its wallet codePUT/wallets/{walletCode}/block
Example URI
- walletCode
number
(required)The code of the customer wallet
Headers
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
200
Body
{
"success": true
}
Unblock wallet ¶
Unblock a wallet, given its wallet codePUT/wallets/{walletCode}/unblock
Example URI
- walletCode
number
(required)The code of the customer wallet
Headers
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
200
Body
{
"success": true
}
Delete wallet ¶
Delete a wallet, given its wallet codeDELETE/wallets/{walletCode}/delete
Example URI
- walletCode
number
(required)The code of the customer wallet
Headers
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
200
Body
{
"success": true
}
Transactions ¶
Transaction detail ¶
Get transaction detail & statusGET/transactions/{rrn}
Example URI
- rrn
String
(required)The 12 digit retrieval reference number
Headers
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
200
Body
{
"success": true,
"tranlogs": [
{
"amount": 100000,
"fees": 0,
"wallet": "0901984357",
"rrn": "108820NAN",
"node": "01",
"geoLocation": {
"latitude": 34.8836,
"longitude": 56.1819
},
"ssData": "internalCredit",
"itc": "wcredit",
"id": 265512,
"captureDate": "2017-06-01",
"additionalData": {
"jsonRequest": {
"amount": 100000,
"currency": "3600",
"description": "A description",
"rrn": "108820NAN",
"type": "internalCredit",
"realId": "111111",
"geoLocation": {
"latitude": 34.8836,
"longitude": 56.1819
},
"financialEntityData": {
"entityId": "008",
"entityCustomerAccount": "2101932324"
},
"posAtm": "PESA"
},
"financialEntityData": {
"entityId": "008",
"entityCustomerAccount": "21019333322"
},
"posAtm": "PESA",
"typeDescription": null
},
"currencyCode": "600",
"reversalCount": 0,
"transaction": {
"date": "2017-06-01",
"entries": [
{
"detail": "Debit",
"layer": 3600,
"debit": 100000,
"tags": "internalCredit",
"account": "11.001.00",
"accountDescription": "Received Money"
},
{
"detail": "Credit",
"layer": 3600,
"credit": 100000,
"tags": "internalCredit",
"account": "23.0901037057",
"accountDescription": "Customer: 0901033357 (Daniel Smith) Wallet: 0901032057"
}
],
"journal": "jcard",
"postDate": "2017-06-01T20:15:23Z",
"detail": "A description",
"timestamp": 1496348123054
},
"customer": "Daniel Smith"
}
]
}
Reverse Transaction ¶
Reverse a transaction given its rrnPOST/transactions/reverse/{rrn}
Example URI
- rrn
String
(required)The 12 digit retrieval reference number
Headers
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
200
Body
{
"success": true
}
Void Transaction ¶
Void a transaction given its rrnPUT/transactions/void/{rrn}
Example URI
- rrn
String
(required)The 12 digit retrieval reference number
Headers
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
200
Body
{
"voidRrn": "14628",
"success": true,
"approvalNumber": "770222",
"itc": "200.00",
"resultCode": "0000",
"amount": 120
}
Customers ¶
Customers ¶
Create a customerPOST/customers{?createWallet}
Example URI
- createWallet
boolean
(optional)Boolean indicating whether to create a wallet or not. Accepts
true/false
,yes/no
ory/n
. If not present, it is set to false. This is equivalent to the oldwallet
query parameter, which has been deprecated
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Body
{
"realId": "1438713781889",
"active": true,
"startDate": "2014-12-25",
"endDate": "2016-12-25",
"firstName": "Jane",
"lastName": "Doe",
"lastName2": "Foo",
"email": "jane@janedoe.com",
"address1": "Jane St. 1234",
"city": "Janeopolis",
"zip": "11222",
"state": "JN",
"country": "Jane",
"birthDate": "1992-12-11",
"phone": "123456789",
"institutionId": "0000000001"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "CardHolder",
"description": "CardHolder post",
"type": "object",
"properties": {
"realId": {
"type": "string"
},
"active": {
"type": "boolean"
},
"startDate": {
"type": "string"
},
"endDate": {
"type": "string"
},
"honorific": {
"type": "string"
},
"gender": {
"enum": [
"f",
"m"
]
},
"firstName": {
"type": "string"
},
"middleName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"lastName2": {
"type": "string"
},
"email": {
"type": "string"
},
"address1": {
"type": "string"
},
"address2": {
"type": "string"
},
"city": {
"type": "string"
},
"state": {
"type": "string"
},
"zip": {
"type": "string"
},
"country": {
"type": "string"
},
"birthDate": {
"type": "string"
},
"notes": {
"type": "string"
},
"phone": {
"type": "string"
},
"cardProduct": {
"type": "string"
},
"walletCode": {
"type": "string",
"pattern": "^[a-zA-Z0-9][-_a-zA-Z0-9]{0,63}$"
},
"institutionId": {
"type": "string"
},
"currencyCodes": {
"type": "array",
"items": {
"type": "integer",
"maximum": 1000,
"exclusiveMaximum": true
}
}
},
"required": [
"realId",
"firstName",
"lastName",
"institutionId"
],
"anyOf": [
{
"required": [
"phone"
]
},
{
"required": [
"walletCode"
]
}
],
"additionalProperties": false
}
201
Body
{
"success": true,
"pin": "123456"
}
201
Body
{
"success": true
}
Update a customerPUT/customers
Example URI
Headers
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Body
{
"realId": "1438713781889",
"firstName": "Modified Jane"
}
Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "CardHolder",
"description": "CardHolder put",
"type": "object",
"properties": {
"realId": {
"type": "string"
},
"active": {
"type": "boolean"
},
"startDate": {
"type": "string"
},
"endDate": {
"type": "string"
},
"honorific": {
"type": "string"
},
"gender": {
"enum": [
"f",
"m"
]
},
"firstName": {
"type": "string"
},
"middleName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"lastName2": {
"type": "string"
},
"email": {
"type": "string"
},
"address1": {
"type": "string"
},
"address2": {
"type": "string"
},
"city": {
"type": "string"
},
"state": {
"type": "string"
},
"zip": {
"type": "string"
},
"country": {
"type": "string"
},
"birthDate": {
"type": "string"
},
"notes": {
"type": "string"
},
"phone": {
"type": "string"
}
},
"required": [
"realId"
],
"additionalProperties": false
}
201
Body
{
"success": true
}
Customer ¶
Get by Cardholder's RealIdGET/customers/{realId}
Example URI
- realId
string
(required)the customer’s realId
Headers
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
200
Body
{
"success": true,
"customer": {
"zip": "11222",
"lastName": "Doe",
"country": "Kingdom of Jane",
"notes": null,
"gender": null,
"institutionId": "00000000001",
"endDate": "2016-12-25",
"address2": null,
"city": "Janeopolis",
"address1": "Jane St. 1234",
"active": true,
"birthDate": "1992-12-11",
"firstName": "Jane",
"phone": "58808205",
"lastName2": "Foo",
"middleName": null,
"id": 1661,
"state": "JN",
"realId": "1447348064158",
"startDate": "2014-12-25",
"email": "jane@janedoe.com",
"honorific": null
}
}
Balances ¶
Get customer's balancesGET/customers/{realId}/balance
Example URI
- realId
string
(required)the customer’s realId
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
201
Body
{
"success": true,
"balances": [
{
"balance": 0,
"journalCode": "jcard",
"accountCode": "21.0000000001.31"
},
{
"balance": 0,
"journalCode": "jcard",
"accountCode": "21.0000000001.00"
},
{
"balance": 0,
"journalCode": "jcard",
"accountCode": "21.0000000001.00"
},
{
"balance": 0,
"journalCode": "jcard",
"accountCode": "21.0000000001.00"
},
{
"balance": 0,
"journalCode": "jcard",
"accountCode": "21.0000000001.00"
}
]
}
Customer's cards ¶
Get customer's cardsGET/customers/{realId}/cards
Example URI
- realId
string
(required)the customer’s realId
Headers
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
200
Body
{
"success": true,
"info": {
"firstName": "Joe",
"middleName": "Solis",
"lastName": "Regueira",
"cards": [
{
"cardState": "ACTIVE",
"cardProduct": 289,
"bin": "457291",
"lastFour": "0148",
"expiration": "2024-04-30",
"virtual": false,
"cardType": "CREDIT",
"pinEnabled": true
}
]
}
}
Agents ¶
Create an Agent ¶
PostPOST/agents{?wallet}
Example URI
- wallet
boolean
(optional)Boolean indicating whether to create a wallet or not. Accepts
true/false
,yes/no
ory/n
. If not present, it is set to false.
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Body
{
"name": "TestAgent",
"phone": "2232323232",
"type": "PDV",
"account": "11.11111"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Agent",
"description": "Agent post",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"parentId": {
"type": "number"
},
"phone": {
"type": "string"
},
"type": {
"type": "string"
},
"account": {
"type": "string"
},
"active": {
"type": "boolean"
},
"mcc": {
"type": "string"
}
},
"required": [
"name",
"phone"
],
"additionalProperties": false
}
201
Body
{
"success": true,
"agentId": 2323,
"walletId": 2324
}
Update an Agent ¶
PutPUT/agents/{id}
Example URI
- id
long
(required)The agent’s id
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Body
{
"name": "new name"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Agent",
"description": "Agent post",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"parentId": {
"type": "number"
},
"type": {
"type": "string"
},
"account": {
"type": "string"
},
"active": {
"type": "boolean"
},
"mcc": {
"type": "string"
}
},
"additionalProperties": false
}
201
Body
{
"success": true
}
Card Products ¶
Card products let group issued cards together and set their features (virtual, physical, smart) and controls such as available transaction types and usage limits.
Operations ¶
Create a card productPOST/cardproducts
Example URI
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Body
{
"name": "TestCardProduct2",
"code": "4569",
"active": true,
"cardNumberLength": 10,
"allowEcommerce": false,
"allowMoto": false,
"allowPos": false,
"allowTips": false,
"smart": true,
"startDate": "2019-01-01",
"endDate": "2049-01-01",
"issuedAccount": "11.001.00",
"issuer": 67,
"feeAccount": "31.001.00"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "CardProduct",
"description": "CardProduct POST",
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 40
},
"code": {
"type": "string",
"maxLength": 40
},
"issuer": {
"type": "number"
},
"institutionId": {
"type": "string"
},
"issuedAccount": {
"type": "string",
"maxLength": 40
},
"feeAccount": {
"type": "string",
"maxLength": 40
},
"lossesAccount": {
"type": "string",
"maxLength": 40
},
"externalAccount": {
"type": "string",
"maxLength": 40
},
"active": {
"type": "boolean"
},
"anonymous": {
"type": "boolean"
},
"bin": {
"type": "string",
"maxLength": 6
},
"cardNumberLength": {
"type": "number"
},
"randomCardNumber": {
"type": "boolean"
},
"allowAtm": {
"type": "boolean"
},
"allowEcommerce": {
"type": "boolean"
},
"allowMoto": {
"type": "boolean"
},
"allowPos": {
"type": "boolean"
},
"allowTips": {
"type": "boolean"
},
"smart": {
"type": "boolean"
},
"startDate": {
"type": "string"
},
"endDate": {
"type": "string"
}
},
"required": [
"name",
"code"
],
"oneOf": [
{
"required": [
"issuer"
]
},
{
"required": [
"institutionId"
]
}
],
"additionalProperties": false
}
201
Body
{
"success": true,
"cardproduct": {
"id": 1660,
"name": "TestCardProduct2",
"code": "4569",
"active": true,
"cardNumberLength": 10,
"allowEcommerce": false,
"allowMoto": false,
"allowPos": false,
"allowTips": false,
"smart": true,
"startDate": "2019-01-01",
"endDate": "2049-01-01",
"issuedAccount": "11.001.00",
"issuer": 67,
"institutionId": "002",
"feeAccount": "31.001.00"
}
}
Retrieve a card productGET/cardproducts/{id}
Example URI
- id
string
(required)card product id
Headers
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
200
Body
{
"success": true,
"cardproduct": {
"id": 68,
"name": "jCard",
"active": true,
"allowAtm": false,
"cardLength": 0,
"allowEcommerce": false,
"allowMoto": false,
"allowPos": false,
"allowTips": false,
"smart": false,
"startDate": "2005-01-01",
"endDate": "2049-01-01",
"issuedAccount": "11.001.00",
"issuer": 67,
"feeAccount": "31.001.00"
}
}
Update a card productPUT/cardproducts/{id}/
Example URI
- id
string
(required)card product id
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Body
{
"name": "TestCardProduct2",
"code": "4569",
"active": true,
"cardNumberLength": 10,
"allowEcommerce": false,
"allowMoto": false,
"allowPos": false,
"allowTips": false,
"smart": true,
"startDate": "2019-01-01",
"endDate": "2049-01-01",
"issuedAccount": "11.001.00",
"issuer": 67,
"feeAccount": "31.001.00"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "CardProduct",
"description": "CardProduct PUT",
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 40
},
"code": {
"type": "string",
"maxLength": 40
},
"issuer": {
"type": "number"
},
"institutionId": {
"type": "string"
},
"issuedAccount": {
"type": "string",
"maxLength": 40
},
"feeAccount": {
"type": "string",
"maxLength": 40
},
"lossesAccount": {
"type": "string",
"maxLength": 40
},
"externalAccount": {
"type": "string",
"maxLength": 40
},
"active": {
"type": "boolean"
},
"anonymous": {
"type": "boolean"
},
"bin": {
"type": "string",
"maxLength": 6
},
"cardNumberLength": {
"type": "number"
},
"randomCardNumber": {
"type": "boolean"
},
"allowAtm": {
"type": "boolean"
},
"allowEcommerce": {
"type": "boolean"
},
"allowMoto": {
"type": "boolean"
},
"allowPos": {
"type": "boolean"
},
"allowTips": {
"type": "boolean"
},
"smart": {
"type": "boolean"
},
"startDate": {
"type": "string"
},
"endDate": {
"type": "string"
}
},
"dependencies": {
"issuer": {
"not": {
"required": [
"institutionId"
]
}
},
"institutionId": {
"not": {
"required": [
"issuer"
]
}
}
},
"additionalProperties": false
}
201
Body
{
"success": true,
"cardproduct": {
"id": 1660,
"name": "TestCardProduct2",
"code": "4569",
"active": true,
"allowAtm": false,
"cardNumberLength": 10,
"allowEcommerce": false,
"allowMoto": false,
"allowPos": false,
"allowTips": false,
"smart": true,
"startDate": "2019-01-01",
"endDate": "2049-01-01",
"issuer": 67,
"institutionId": "002",
"issuedAccount": "11.001.00",
"feeAccount": "31.001.00"
}
}
Create a velocity profilePOST/cardproducts/{cardProductId}/velocityprofiles
Example URI
- cardProductId
number
(required) Example: 69card product ID
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Body
{
"name": "MaxTwoHundred",
"active": true,
"currencyCode": "840",
"approvalsOnly": false,
"usageLimit": 1,
"amountLimit": 200,
"validOnCredit": false,
"validOnPurchase": true,
"validOnTransfer": true,
"validOnWithdrawal": true,
"scopeEntity": "card",
"scopeTime": "daily"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "VelocityProfile",
"description": "Velocity profile",
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 40
},
"active": {
"type": "boolean"
},
"approvalsOnly": {
"type": "boolean"
},
"scopeEntity": {
"type": "string",
"enum": [
"account",
"card"
]
},
"validOnPurchase": {
"type": "boolean"
},
"validOnWithdrawal": {
"type": "boolean"
},
"validOnTransfer": {
"type": "boolean"
},
"currencyCode": {
"type": "string",
"maxLength": 5
},
"usageLimit": {
"type": "number"
},
"amountLimit": {
"type": "number"
},
"validOnCredit": {
"type": "boolean"
},
"scopeTime": {
"type": "string",
"enum": [
"monthly",
"daily"
]
}
},
"required": [
"name",
"active",
"approvalsOnly",
"currencyCode",
"amountLimit",
"scopeEntity",
"scopeTime"
],
"additionalProperties": false
}
200
Body
{
"success": true,
"velocityprofile": {
"id": 69,
"name": "MaxTwoHundred",
"active": true,
"currencyCode": "840",
"approvalsOnly": false,
"usageLimit": 1,
"amountLimit": 200,
"validOnCredit": false,
"validOnPurchase": true,
"validOnTransfer": true,
"validOnWithdrawal": true,
"scopeEntity": "card",
"scopeTime": "none"
}
}
Retrieve a velocity profileGET/cardproducts/{id}/velocityprofiles/{velocityId}
Example URI
- id
number
(required) Example: 69card product ID
- velocityId
number
(required) Example: 324velocity profile ID
Headers
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
200
Body
{
"success": true,
"velocityprofile": {
"id": 69,
"name": "MaxTwoHundred",
"active": true,
"currencyCode": "840",
"approvalsOnly": false,
"usageLimit": 1,
"amountLimit": 200,
"validOnCredit": false,
"validOnPurchase": true,
"validOnTransfer": true,
"validOnWithdrawal": true,
"scopeEntity": "card",
"scopeTime": "none"
}
}
Update a velocity profilePUT/cardproducts/{cardProductId}/velocityprofiles/{velocityProfileId}
Example URI
- cardProductId
number
(required) Example: 235card product ID
- velocityProfileId
number
(required) Example: 953velocity profile ID
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Body
{
"name": "MaxTwoHundred_changed",
"scopeEntity": "card",
"scopeTime": "daily",
"currencyCode": "840",
"approvalsOnly": false,
"usageLimit": 2,
"amountLimit": 150
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "VelocityProfile",
"description": "Velocity profile",
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 40
},
"active": {
"type": "boolean"
},
"approvalsOnly": {
"type": "boolean"
},
"scopeEntity": {
"type": "string",
"enum": [
"account",
"card"
]
},
"validOnPurchase": {
"type": "boolean"
},
"validOnWithdrawal": {
"type": "boolean"
},
"validOnTransfer": {
"type": "boolean"
},
"currencyCode": {
"type": "string",
"maxLength": 5
},
"usageLimit": {
"type": "number"
},
"amountLimit": {
"type": "number"
},
"validOnCredit": {
"type": "boolean"
},
"scopeTime": {
"type": "string",
"enum": [
"monthly",
"daily"
]
}
},
"additionalProperties": false
}
200
Body
{
"success": true,
"velocityprofile": {
"id": 69,
"name": "MaxTwoHundred",
"active": true,
"currencyCode": "840",
"approvalsOnly": false,
"usageLimit": 1,
"amountLimit": 200,
"validOnCredit": false,
"validOnPurchase": true,
"validOnTransfer": true,
"validOnWithdrawal": true,
"scopeEntity": "card",
"scopeTime": "none"
}
}
Delete a velocity profileDELETE/cardproducts/{id}/velocityprofiles/{velocityId}
Example URI
- id
number
(required) Example: 5345card product ID
- velocityId
number
(required) Example: 645velocity profile ID
Headers
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
200
Body
{
"success": true
}
Retrieve all velocity profilesGET/cardproducts/{id}/velocityprofiles
Example URI
- id
number
(required) Example: 613card product ID
Headers
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
200
Body
{
"success": true,
"velocityprofiles": [
{
"id": 69,
"name": "MaxTwoHundred",
"active": true,
"currencyCode": "840",
"approvalsOnly": false,
"usageLimit": 1,
"amountLimit": 200,
"validOnCredit": false,
"validOnPurchase": true,
"validOnTransfer": true,
"validOnWithdrawal": true,
"scopeEntity": "card",
"scopeTime": "none"
},
{
"id": 70,
"name": "FiveHundred",
"active": true,
"currencyCode": "840",
"approvalsOnly": true,
"usageLimit": 5,
"amountLimit": 500,
"validOnCredit": false,
"validOnPurchase": true,
"validOnTransfer": true,
"validOnWithdrawal": true,
"scopeEntity": "account",
"scopeTime": "none"
}
]
}
Cards ¶
Card ¶
Create cardPOST/cards
Example URI
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Body
{
"cardHolder": "0000001",
"accountCode": "21.0000101.00",
"cardProduct": "jCard",
"bin": "455566",
"expiration": "201805",
"serviceCode": "220",
"embossingName": "John",
"virtual": true
}
Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Card",
"description": "A card to post",
"type": "object",
"properties": {
"cardHolder": {
"type": "string"
},
"cardProduct": {
"type": "string"
},
"bin": {
"type": "string",
"description": "Numeric string, length 6",
"pattern": "^[0-9]{6}$"
},
"pan": {
"type": "string",
"description": "Numeric string, lengths 13-19",
"pattern": "^[0-9]{13,19}$"
},
"track1": {
"type": "string",
"description": "Credit/Debit card Track 1 pattern",
"pattern": "^[%]?[A-Z]+([0-9]{1,19})\\^([^\\^]{2,26})\\^([0-9]{4})([0-9]{3})([0-9]{4})?([0-9]{1,10})?"
},
"track2": {
"type": "string",
"description": "Credit/Debit card Track 2 pattern",
"pattern": "^([0-9]{1,19})[=D]([0-9]{4})([0-9]{3})?([0-9]{4})?([0-9]{1,10})?$"
},
"expiration": {
"type": "string",
"description": "Expiration date numeric",
"pattern": "^([0-9]{4}(0[0-9]|1[0-2]))$"
},
"serviceCode": {
"type": "string",
"description": "Service code three digit numeric",
"pattern": "^[0-9]{3}$"
},
"embossingName": {
"type": "string"
},
"virtual": {
"type": "boolean"
}
},
"required": [
"cardHolder",
"cardProduct"
],
"oneOf": [
{
"required": [
"bin",
"expiration",
"serviceCode"
]
},
{
"required": [
"pan",
"expiration",
"serviceCode"
]
},
{
"required": [
"track1",
"track2"
]
}
],
"additionalProperties": false
}
201
Body
{
"success": true,
"lastFour": "6326",
"pinEnabled": false,
"id": 1618
}
Add credit to a cardPOST/cards/{token}/credit
Example URI
- token
string
(required)Card token number
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Body
{
"amount" : 100.00,
"currency" : 840,
"description": "Credit 100"
"channel" : "jcard",
"invoice" : "a200",
"reason" : "Credit 100",
"rrn" : "548715406820"
}
Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"currency": {
"type": "number"
},
"amount": {
"type": "number",
"minimum" : 0,
"exclusiveMinimum": true
},
"rrn": {
"type": "string",
"description": "Alphanumeric string, length 12",
"pattern": "^[a-zA-Z0-9]{1,12}$"
},
"description": {
"type": "string"
},
"channel": {
"type": "string"
},
"invoice": {
"type": "string"
},
"reason": {
"type": "string"
}
},
"required": ["amount", "currency", "rrn"],
"additionalProperties": false
}
201
Body
{
"success": true,
"approvalNumber": "810161",
"itc": "R200.40.21",
"resultCode": "0000"
}
Transfer from a cardPOST/cards/transfers
Example URI
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Body
{
"channel": "jcard",
"amount": 100,
"currency": 840,
"reason": "pagoServicios",
"reference": "Arreglo",
"id": "AA1234"
}
Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"recipient": {
"type": "string",
"minLength": 1
},
"sender": {
"type": "string",
"minLength": 1
},
"currency": {
"type": "number"
},
"amount": {
"type": "number",
"minimum": 0,
"exclusiveMinimum": true
},
"reference": {
"type": "string",
"minLength": 1,
"maxLength": 250
},
"rrn": {
"type": "string",
"description": "Alphanumeric string, length 12",
"pattern": "^[a-zA-Z0-9]{1,12}$"
},
"reason": {
"type": "string",
"minLength": 1,
"maxLength": 250
},
"channel": {
"type": "string",
"minLength": 1
},
"description": {
"type": "string"
}
},
"required": [
"amount",
"currency",
"rrn",
"sender",
"recipient"
],
"additionalProperties": false
}
201
Body
{
"success": true,
"approvalNumber": "795698",
"itc": "200.40",
"resultCode": "0000"
}
Debit from cardPOST/cards/{token}/debit
Example URI
- token
string
(required)Card token number
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Body
{
"currency" : 840,
"amount" : 100,
"description": "Credit 100"
"channel" : "jcard",
"invoice" : "a200",
"reason" : "Credit 100",
"rrn" : "3918506454",
"pinblk" : "ABCHSBDHB12121",
"ksn" : "ABDHABHDSBDHS"
}
Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"currency": {
"type": "number"
},
"amount": {
"type": "number",
"minimum" : 0,
"exclusiveMinimum": true
},
"rrn": {
"type": "string",
"description": "Alphanumeric string, length 12",
"pattern": "^[a-zA-Z0-9]{1,12}$"
},
"description": {
"type": "string"
},
"channel": {
"type": "string"
},
"invoice": {
"type": "string"
},
"reason": {
"type": "string"
}
},
"required": ["amount", "currency", "rrn"],
"additionalProperties": false
}
201
Body
{
"success": true,
"approvalNumber": "946279",
"itc": "200.00",
"resultCode": "0000"
}
Change the card's statusPUT/cards/{token}/status
Example URI
- token
string
(required)Card token number
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Body
{
"cardState": "active"
}
Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"cardState": {
"type": "string",
"enum": [
"nonactivated",
"active",
"suspended",
"lost",
"stolen",
"fraud",
"compliance",
"debt",
"created",
"issued",
"deleted",
"expired",
"cancelled"
]
}
},
"required": [
"cardState"
],
"additionalProperties": false
}
200
Body
{
"success": true
}
Activate CardPUT/cards/{token}/activate
Given the card’s token/hash value, set’s the card’s state to ACTIVE
.
The previous state is also validated.
If the card’s state is already ACTIVE
, "success" : true
is returned anyways.
Example URI
- token
string
(required)Card’s token unique number
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
200
Body
{
"success": true
}
Get Card DetailGET/cards/{token}
For a given the card’s token value, returns the entire card details.
Example URI
- token
string
(required)Card’s token unique number
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
200
Body
{
"success": true,
"cardholderId": "1086",
"accountId": "35",
"productId": "4",
"pan": "484613XXXXXX6787",
"expiryDate": "2309",
"cardType": "CREDIT",
"status": "ACTIVE",
"embossedName": "John",
"pinEnabled": true,
"virtual": false
}
404
Body
{
"success": false,
"error": "not.found"
}
Update CardPUT/cards/{token}
For a given the card’s token/hash value, Update the Card’s attributes. All attributes provided in the request will be updated. This API should only supply required data meant to be modified.
Example URI
- token
string
(required)Card’s token unique number
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Body
{
"virtual": false,
"cardProductId": 12
}
Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Card",
"description": "A card to update",
"type": "object",
"properties": {
"cardProduct": {
"type": "number"
},
"expiration": {
"type": "string",
"description": "Expiration date numeric",
"pattern": "^([0-9]{4}(0[0-9]|1[0-2]))$"
},
"virtual": {
"type": "boolean"
}
},
"additionalProperties": false
}
200
Body
{
"success": true
}
404
Body
{
"success": false,
"error": "not.found"
}
Change Card PINPUT/cards/{token}/pin
For a given the card’s token/hash value, Change the PIN.
Example URI
- token
string
(required)Card’s token unique number
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Body
{
"pin": "1234"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Pin Change",
"description": "Pin Change",
"type": "object",
"properties": {
"newPIN": {
"type": "string",
"minLength": 16,
"pattern": "^[A-Z0-9]*$"
},
"oldPIN": {
"type": "string",
"minLength": 16,
"pattern": "^[A-Z0-9]*$"
}
},
"required": [
"newPIN"
],
"additionalProperties": false
}
200
Body
{
"success": true
}
404
Body
{
"success": false,
"error": "not.found"
}
Associate Card with AccountPUT/cards/{token}/account
For a given the card’s token/hash value, associate this card to an account.
Example URI
- token
string
(required)Card’s token unique number
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Body
{
"accountCode": "21.143871378194.00",
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Associate Card with Account",
"description": "Associate Card with Account",
"type": "object",
"properties": {
"accountCode": {
"type": "string"
}
},
"required": [ "accountCode" ],
"additionalProperties": false
}
200
Body
{
"success": true
}
404
Body
{
"success": false,
"error": "not.found"
}
Associate Card with Card HolderPUT/cards/{token}/cardholder
For a given the card’s token/hash value, associate this card to a Card Holder.
Example URI
- token
string
(required)Card’s token unique number
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Body
{
"cardholderRealId": "143871378194",
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Associate Card with Cardholder",
"description": "Associate Card with Cardholder",
"type": "object",
"properties": {
"cardholderRealId": {
"type": "string"
}
},
"required": [ "cardholderRealId" ],
"additionalProperties": false
}
200
Body
{
"success": true
}
404
Body
{
"success": false,
"error": "not.found"
}
Card Balance EnquiryGET/cards/{token}/balance
For a given the card’s token/hash value, returns the current available balance on the card. This API will internally use Account Balance API. If Card is associated with a particular account, returns the balance of that account. If Card is associated with a Card Holder, returns the balance of for Card Holder.
Example URI
- token
string
(required)Card’s token unique number
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
200
Body
{
"success": true,
"date": "2015-07-06",
"accountCode": "20.001.001",
"balance": 157,
"layers": "840,1840",
"journalCode": "jcard"
}
404
Body
{
"success": false,
"error": "not.found"
}
Get Card's transactionsGET/cards/{token}/transactions{?start,end,itc,currency,irc,order,length,offset,balance}
Example URI
- token
string
(required)Card token number
- start
string
(optional)Start date.
- end
string
(optional)End date.
- itc
string
(optional)Internal transacion code.
- currency
string
(optional)Comma-separated string of currencies that should be included, the rest will be filtered out.
- irc
string
(optional)Comma-separated string of IRCs that should be included, the rest will be filtered out. Default value is ‘0000’
- order
string
(optional)asc/desc. Ascending or descending order chronological order.
- length
number
(optional)The number of transactions to return (default 5).
- offset
number
(optional)Index of the first transaction to return (default 0).
- balance
boolean
(optional)if provided, return the balance on the card as well.
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
200
Body
{
"success": true,
"balance": {
"date": "2015-07-06",
"accountCode": "20.001.001",
"balance": 157.89,
"layers": "840,1840",
"journalCode": "jcard"
},
"transactions": [
{
"date": "2019-12-18 17:46:55",
"descripcion": "adelanto",
"code": "cardrest::credit",
"responseCode": "0000",
"approvalNumber": "639412",
"comercio": "red",
"currency": 840,
"confirmed": true,
"irc": "0000",
"reversalCount": 0,
"mid": "000000001",
"tid": "tid001",
"rrn": "210308153401",
"stan": "000000153401"
},
{
"date": "2019-11-28 16:39:09",
"descripcion": "adelanto",
"code": "cardrest::credit",
"responseCode": "0000",
"approvalNumber": "639412",
"comercio": "red",
"currency": 840,
"confirmed": true,
"irc": "0000",
"reversalCount": 0,
"mid": "000000001",
"tid": "tid001",
"rrn": "210308153401",
"stan": "000000153401"
}
]
}