Back to top

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 Get
GET/echo

This resource does not have any body (only the mandatory headers) and returns a JSON.

Example URI

GET http://localhost:8081/jcard/api/echo
Request
HideShow
Headers
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "success": true,
  "version": "2.0.1-SNAPSHOT",
  "revision": "e6114e4",
  "timestamp": 1433356981132
}

Echo Post
POST/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

POST http://localhost:8081/jcard/api/echo
Request
HideShow
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Body
{
  "payload": 100
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "success": true,
  "payload": 100
}

SysConfig

SysConfig collection

Get All SysConfigs
GET/sysconfig

Returns all the available SysConfigs

Example URI

GET http://localhost:8081/jcard/api/sysconfig
Request
HideShow
Headers
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Response  200
HideShow
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"
    }
  ]
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "success": false,
  "errors": "invalid.permissions"
}

Post SysConfig
POST/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

POST http://localhost:8081/jcard/api/sysconfig
Request
HideShow
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"]
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "success": true
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "success": false,
  "error": "invalid.permissions"
}
Response  409
HideShow
Headers
Content-Type: application/json
Body
{
  "success": false,
  "error": "already.exists"
}

Update a SysConfig
PUT/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

PUT http://localhost:8081/jcard/api/sysconfig
Request
HideShow
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"]
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "success": true
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "success": false,
  "error": "invalid.permissions"
}
Response  409
HideShow
Headers
Content-Type: application/json
Body
{
  "success": false,
  "error": "not.exists"
}

SysConfig

A SysConfig object has the following attributes:

  • id

  • value

  • writeperm

  • readperm

Get SysConfig
GET/sysconfig/{id}/

Given an ID, returns the corresponding SysConfig

Example URI

GET http://localhost:8081/jcard/api/sysconfig/id/
URI Parameters
HideShow
id
string (required) 

The ID of the SysConfig in the form of a string

Request
HideShow
Headers
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "success": true,
  "sysConfig": {
    "id": "perm.login",
    "value": "Login",
    "readperm": "login",
    "writeperm": "admin"
  }
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "success": false,
  "errors": "invalid.permissions"
}
Response  409
HideShow
Headers
Content-Type: application/json
Body
{
  "success": false,
  "errors": "invalid.sysconfig"
}

Delete SysConfig
DELETE/sysconfig/{id}/

Given an ID, deletes the corresponding SysConfig

Example URI

DELETE http://localhost:8081/jcard/api/sysconfig/id/
URI Parameters
HideShow
id
string (required) 

The ID of the SysConfig in the form of a string

Request
HideShow
Headers
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    "success" : true,
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "success": false,
  "errors": "invalid.permissions"
}
Response  409
HideShow
Headers
Content-Type: application/json
Body
{
  "success": false,
  "errors": "invalid.sysconfig"
}

GL

Transactions

Post a transaction
POST/gl/transactions

Example URI

POST http://localhost:8081/jcard/api/gl/transactions
Request
HideShow
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
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "success": true
}

Account Balance

Get Balance
GET/gl/journals/{journalCode}/accounts/{accountCode}/balance{?layers,date}

Example URI

GET http://localhost:8081/jcard/api/gl/journals/jcard/accounts/12.001.00 /balance?layers=&date=
URI Parameters
HideShow
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”

Request
HideShow
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Response  200
HideShow
Body
{
  "response": {
    "date": "2015-07-06",
    "accountCode": "20.001.001",
    "balance": 157,
    "layers": "840,1840",
    "journalCode": "jcard"
  },
  "success": true
}

Account Statement

Get Account Statement
GET/gl/journals/{journalCode}/accounts/{accountCode}/statement{?layers,start,end}

Example URI

GET http://localhost:8081/jcard/api/gl/journals/jcard/accounts/12.001.00 /statement?layers=&start=&end=
URI Parameters
HideShow
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”

Request
HideShow
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Response  200
HideShow
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 Account
POST/gl/charts/{chartName}/accounts

Example URI

POST http://localhost:8081/jcard/api/gl/charts/jcard/accounts
URI Parameters
HideShow
chartName
string (required) Example: jcard
Request
HideShow
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
}
Response  201
HideShow
Body
{
  "success": true
}

Login

Login

Login a Customer
POST/login

Example URI

POST http://localhost:8081/jcard/api/login
Request
HideShow
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
}
Response  201
HideShow
Body
{
  "success": true,
  "secret": "95583420e1582b514dcdfb4a85437dc1a019c5bc31ada50597b4d6ec7781f38f",
  "consumer": "c400ded2-f9cc-11e4-accc-3c15c2cf79f2"
}

Wallet

Wallet

Create a new Wallet
POST/wallets

Example URI

POST http://localhost:8081/jcard/api/wallets
Request
HideShow
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
}
Response  201
HideShow
Body
{
  "success": true,
  "id": 2201,
  "pin": "123456"
}

Credit

Add credit to a wallet
POST/wallets/{walletCode}/credit{?dryRun}

Example URI

POST http://localhost:8081/jcard/api/wallets/walletCode/credit?dryRun=
URI Parameters
HideShow
walletCode
number (required) 

The code of the wallet to add credit.

dryRun
boolean (optional) 

Indicates whether the transaction will be executed or not.

Request
HideShow
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
}
Response  200
HideShow
Body
{
  "fees": [
    {
      "amount": 10,
      "type": "cashAdvance.flat.840",
      "account": "31.001.00"
    }
  ],
  "success": true,
  "amountWithFees": 20
}

Debit

Debit from a wallet
POST/wallets/{walletCode}/debit{?dryRun}

Example URI

POST http://localhost:8081/jcard/api/wallets/walletCode/debit?dryRun=
URI Parameters
HideShow
walletCode
number (required) 

The code of the wallet to debit from.

dryRun
boolean (optional) 

Indicates whether the transaction will be executed or not.

Request
HideShow
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
}
Response  200
HideShow
Body
{
  "fees": [
    {
      "amount": 10,
      "type": "creditBankAccountW2A.flat.840",
      "account": "31.001.00"
    }
  ],
  "success": true,
  "amountWithFees": 20
}

Balance

Get a wallet's balance
GET/wallets/{walletCode}/balance{?date,layers}

Example URI

GET http://localhost:8081/jcard/api/wallets/walletCode/balance?date=&layers=
URI Parameters
HideShow
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”

Request
HideShow
Headers
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Response  201
HideShow
Body
{
  "success": true,
  "balance": "300.00"
}

CashOut Balance

Get a wallet's cashOut balance
GET/wallets/{walletCode}/cashOutBalance{?date,layers,type}

Example URI

GET http://localhost:8081/jcard/api/wallets/walletCode/cashOutBalance?date=&layers=&type=
URI Parameters
HideShow
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”

Request
HideShow
Headers
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Response  201
HideShow
Body
{
  "success": true,
  "balance": "300.00"
}

Statement

Get a wallet's 'mini' statement
GET/wallets/{walletCode}/statement{?layers,length}

Returns the entries ordered by most recent first.

Example URI

GET http://localhost:8081/jcard/api/wallets/walletCode/statement?layers=&length=
URI Parameters
HideShow
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.

Request
HideShow
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Response  200
HideShow
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 entries
GET/wallets/{walletCode}/transactions{?start,end,length,itc,asc}

Returns the TranLog entries of a specified wallet.

Example URI

GET http://localhost:8081/jcard/api/wallets/walletCode/transactions?start=&end=&length=&itc=&asc=
URI Parameters
HideShow
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).

Request
HideShow
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Response  200
HideShow
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 statement
GET/wallets/{walletCode}/detail{?layers,start,end,order}

Returns the entries between start and end date (or all of them) chronologically ordered.

Example URI

GET http://localhost:8081/jcard/api/wallets/walletCode/detail?layers=&start=&end=&order=
URI Parameters
HideShow
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.

Request
HideShow
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Response  200
HideShow
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 wallet
POST/wallets/{sourceWalletCode}/transfer{?dryRun}/{destinationWalletCode}

Example URI

POST http://localhost:8081/jcard/api/wallets/sourceWalletCode/transfer?dryRun=/destinationWalletCode
URI Parameters
HideShow
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.

Request
HideShow
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
}
Response  200
HideShow
Body
{
  "fees": [
    {
      "amount": 10,
      "type": "cashAdvance.flat.840",
      "account": "31.001.00"
    }
  ],
  "success": true,
  "amountWithFees": 20
}

Wallet Customer

Get a wallet's customer
GET/wallets/{walletCode}/customer

Example URI

GET http://localhost:8081/jcard/api/wallets/walletCode/customer
URI Parameters
HideShow
walletCode
number (required) 

The code of the customer wallet

Request
HideShow
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Response  200
HideShow
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 customer
PUT/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

PUT http://localhost:8081/jcard/api/wallets/walletCode/link
URI Parameters
HideShow
walletCode
number (required) 

The code of the customer wallet

Request
HideShow
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
}
Response  201
HideShow
Body
{
  "success": true
}

Update a wallet's customer
PUT/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

PUT http://localhost:8081/jcard/api/wallets/walletCode/customer
URI Parameters
HideShow
walletCode
number (required) 

The code of the customer wallet

Request
HideShow
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
}
Response  201
HideShow
Body
{
  "success": true
}

Owner

Get owner's type
GET/wallets/{walletCode}/type

Example URI

GET http://localhost:8081/jcard/api/wallets/walletCode/type
URI Parameters
HideShow
walletCode
number (required) 

The code of the customer wallet

Request
HideShow
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Response  200
HideShow
Body
{
  "wallet": {
    "type": "customer",
    "id": "1441994047036"
  },
  "success": true
}

Change Pin

Change Pin
PUT/wallets/{walletCode}/changepin

Example URI

PUT http://localhost:8081/jcard/api/wallets/walletCode/changepin
URI Parameters
HideShow
walletCode
number (required) 

The code of the customer wallet

Request
HideShow
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
}
Response  200
HideShow
Body
{
  "success": true
}

Block wallet

Block a wallet, given its wallet code
PUT/wallets/{walletCode}/block

Example URI

PUT http://localhost:8081/jcard/api/wallets/walletCode/block
URI Parameters
HideShow
walletCode
number (required) 

The code of the customer wallet

Request
HideShow
Headers
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Response  200
HideShow
Body
{
  "success": true
}

Unblock wallet

Unblock a wallet, given its wallet code
PUT/wallets/{walletCode}/unblock

Example URI

PUT http://localhost:8081/jcard/api/wallets/walletCode/unblock
URI Parameters
HideShow
walletCode
number (required) 

The code of the customer wallet

Request
HideShow
Headers
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Response  200
HideShow
Body
{
  "success": true
}

Delete wallet

Delete a wallet, given its wallet code
DELETE/wallets/{walletCode}/delete

Example URI

DELETE http://localhost:8081/jcard/api/wallets/walletCode/delete
URI Parameters
HideShow
walletCode
number (required) 

The code of the customer wallet

Request
HideShow
Headers
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Response  200
HideShow
Body
{
  "success": true
}

Transactions

Transaction detail

Get transaction detail & status
GET/transactions/{rrn}

Example URI

GET http://localhost:8081/jcard/api/transactions/rrn
URI Parameters
HideShow
rrn
String (required) 

The 12 digit retrieval reference number

Request
HideShow
Headers
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Response  200
HideShow
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 rrn
POST/transactions/reverse/{rrn}

Example URI

POST http://localhost:8081/jcard/api/transactions/reverse/rrn
URI Parameters
HideShow
rrn
String (required) 

The 12 digit retrieval reference number

Request
HideShow
Headers
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Response  200
HideShow
Body
{
  "success": true
}

Void Transaction

Void a transaction given its rrn
PUT/transactions/void/{rrn}

Example URI

PUT http://localhost:8081/jcard/api/transactions/void/rrn
URI Parameters
HideShow
rrn
String (required) 

The 12 digit retrieval reference number

Request
HideShow
Headers
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Response  200
HideShow
Body
{
  "voidRrn": "14628",
  "success": true,
  "approvalNumber": "770222",
  "itc": "200.00",
  "resultCode": "0000",
  "amount": 120
}

Customers

Customers

Create a customer
POST/customers{?createWallet}

Example URI

POST http://localhost:8081/jcard/api/customers?createWallet=
URI Parameters
HideShow
createWallet
boolean (optional) 

Boolean indicating whether to create a wallet or not. Accepts true/false, yes/no or y/n. If not present, it is set to false. This is equivalent to the old wallet query parameter, which has been deprecated

Request
HideShow
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
}
Response  201
HideShow
Body
{
  "success": true,
  "pin": "123456"
}
Response  201
HideShow
Body
{
  "success": true
}

Update a customer
PUT/customers

Example URI

PUT http://localhost:8081/jcard/api/customers
Request
HideShow
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
}
Response  201
HideShow
Body
{
  "success": true
}

Customer

Get by Cardholder's RealId
GET/customers/{realId}

Example URI

GET http://localhost:8081/jcard/api/customers/realId
URI Parameters
HideShow
realId
string (required) 

the customer’s realId

Request
HideShow
Headers
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Response  200
HideShow
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 balances
GET/customers/{realId}/balance

Example URI

GET http://localhost:8081/jcard/api/customers/realId/balance
URI Parameters
HideShow
realId
string (required) 

the customer’s realId

Request
HideShow
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Response  201
HideShow
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 cards
GET/customers/{realId}/cards

Example URI

GET http://localhost:8081/jcard/api/customers/realId/cards
URI Parameters
HideShow
realId
string (required) 

the customer’s realId

Request
HideShow
Headers
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Response  200
HideShow
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

Post
POST/agents{?wallet}

Example URI

POST http://localhost:8081/jcard/api/agents?wallet=
URI Parameters
HideShow
wallet
boolean (optional) 

Boolean indicating whether to create a wallet or not. Accepts true/false, yes/no or y/n. If not present, it is set to false.

Request
HideShow
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
}
Response  201
HideShow
Body
{
  "success": true,
  "agentId": 2323,
  "walletId": 2324
}

Update an Agent

Put
PUT/agents/{id}

Example URI

PUT http://localhost:8081/jcard/api/agents/id
URI Parameters
HideShow
id
long (required) 

The agent’s id

Request
HideShow
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
}
Response  201
HideShow
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 product
POST/cardproducts

Example URI

POST http://localhost:8081/jcard/api/cardproducts
Request
HideShow
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
}
Response  201
HideShow
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 product
GET/cardproducts/{id}

Example URI

GET http://localhost:8081/jcard/api/cardproducts/id
URI Parameters
HideShow
id
string (required) 

card product id

Request
HideShow
Headers
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Response  200
HideShow
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 product
PUT/cardproducts/{id}/

Example URI

PUT http://localhost:8081/jcard/api/cardproducts/id/
URI Parameters
HideShow
id
string (required) 

card product id

Request
HideShow
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
}
Response  201
HideShow
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 profile
POST/cardproducts/{cardProductId}/velocityprofiles

Example URI

POST http://localhost:8081/jcard/api/cardproducts/69/velocityprofiles
URI Parameters
HideShow
cardProductId
number (required) Example: 69

card product ID

Request
HideShow
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
}
Response  200
HideShow
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 profile
GET/cardproducts/{id}/velocityprofiles/{velocityId}

Example URI

GET http://localhost:8081/jcard/api/cardproducts/69/velocityprofiles/324
URI Parameters
HideShow
id
number (required) Example: 69

card product ID

velocityId
number (required) Example: 324

velocity profile ID

Request
HideShow
Headers
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Response  200
HideShow
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 profile
PUT/cardproducts/{cardProductId}/velocityprofiles/{velocityProfileId}

Example URI

PUT http://localhost:8081/jcard/api/cardproducts/235/velocityprofiles/953
URI Parameters
HideShow
cardProductId
number (required) Example: 235

card product ID

velocityProfileId
number (required) Example: 953

velocity profile ID

Request
HideShow
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
}
Response  200
HideShow
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 profile
DELETE/cardproducts/{id}/velocityprofiles/{velocityId}

Example URI

DELETE http://localhost:8081/jcard/api/cardproducts/5345/velocityprofiles/645
URI Parameters
HideShow
id
number (required) Example: 5345

card product ID

velocityId
number (required) Example: 645

velocity profile ID

Request
HideShow
Headers
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Response  200
HideShow
Body
{
  "success": true
}

Retrieve all velocity profiles
GET/cardproducts/{id}/velocityprofiles

Example URI

GET http://localhost:8081/jcard/api/cardproducts/613/velocityprofiles
URI Parameters
HideShow
id
number (required) Example: 613

card product ID

Request
HideShow
Headers
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Response  200
HideShow
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 card
POST/cards

Example URI

POST http://localhost:8081/jcard/api/cards
Request
HideShow
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
}
Response  201
HideShow
Body
{
  "success": true,
  "lastFour": "6326",
  "pinEnabled": false,
  "id": 1618
}

Add credit to a card
POST/cards/{token}/credit

Example URI

POST http://localhost:8081/jcard/api/cards/token/credit
URI Parameters
HideShow
token
string (required) 

Card token number

Request
HideShow
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
}
Response  201
HideShow
Body
{
  "success": true,
  "approvalNumber": "810161",
  "itc": "R200.40.21",
  "resultCode": "0000"
}

Transfer from a card
POST/cards/transfers

Example URI

POST http://localhost:8081/jcard/api/cards/transfers
Request
HideShow
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
}
Response  201
HideShow
Body
{
  "success": true,
  "approvalNumber": "795698",
  "itc": "200.40",
  "resultCode": "0000"
}

Debit from card
POST/cards/{token}/debit

Example URI

POST http://localhost:8081/jcard/api/cards/token/debit
URI Parameters
HideShow
token
string (required) 

Card token number

Request
HideShow
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
}
Response  201
HideShow
Body
{
  "success": true,
  "approvalNumber": "946279",
  "itc": "200.00",
  "resultCode": "0000"
}

Change the card's status
PUT/cards/{token}/status

Example URI

PUT http://localhost:8081/jcard/api/cards/token/status
URI Parameters
HideShow
token
string (required) 

Card token number

Request
HideShow
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
}
Response  200
HideShow
Body
{
  "success": true
}

Activate Card
PUT/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

PUT http://localhost:8081/jcard/api/cards/token/activate
URI Parameters
HideShow
token
string (required) 

Card’s token unique number

Request
HideShow
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Response  200
HideShow
Body
{
  "success": true
}

Get Card Detail
GET/cards/{token}

For a given the card’s token value, returns the entire card details.

Example URI

GET http://localhost:8081/jcard/api/cards/token
URI Parameters
HideShow
token
string (required) 

Card’s token unique number

Request
HideShow
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Response  200
HideShow
Body
{
  "success": true,
  "cardholderId": "1086",
  "accountId": "35",
  "productId": "4",
  "pan": "484613XXXXXX6787",
  "expiryDate": "2309",
  "cardType": "CREDIT",
  "status": "ACTIVE",
  "embossedName": "John",
  "pinEnabled": true,
  "virtual": false
}
Response  404
HideShow
Body
{
  "success": false,
  "error": "not.found"
}

Update Card
PUT/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

PUT http://localhost:8081/jcard/api/cards/token
URI Parameters
HideShow
token
string (required) 

Card’s token unique number

Request
HideShow
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
}
Response  200
HideShow
Body
{
  "success": true
}
Response  404
HideShow
Body
{
  "success": false,
  "error": "not.found"
}

Change Card PIN
PUT/cards/{token}/pin

For a given the card’s token/hash value, Change the PIN.

Example URI

PUT http://localhost:8081/jcard/api/cards/token/pin
URI Parameters
HideShow
token
string (required) 

Card’s token unique number

Request
HideShow
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
}
Response  200
HideShow
Body
{
  "success": true
}
Response  404
HideShow
Body
{
  "success": false,
  "error": "not.found"
}

Associate Card with Account
PUT/cards/{token}/account

For a given the card’s token/hash value, associate this card to an account.

Example URI

PUT http://localhost:8081/jcard/api/cards/token/account
URI Parameters
HideShow
token
string (required) 

Card’s token unique number

Request
HideShow
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
}
Response  200
HideShow
Body
{
  "success": true
}
Response  404
HideShow
Body
{
  "success": false,
  "error": "not.found"
}

Associate Card with Card Holder
PUT/cards/{token}/cardholder

For a given the card’s token/hash value, associate this card to a Card Holder.

Example URI

PUT http://localhost:8081/jcard/api/cards/token/cardholder
URI Parameters
HideShow
token
string (required) 

Card’s token unique number

Request
HideShow
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
}
Response  200
HideShow
Body
{
  "success": true
}
Response  404
HideShow
Body
{
  "success": false,
  "error": "not.found"
}

Card Balance Enquiry
GET/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

GET http://localhost:8081/jcard/api/cards/token/balance
URI Parameters
HideShow
token
string (required) 

Card’s token unique number

Request
HideShow
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
timestamp: 1212332211222
nonce: 121b1b1b
hash: 12b12b12
Response  200
HideShow
Body
{
  "success": true,
  "date": "2015-07-06",
  "accountCode": "20.001.001",
  "balance": 157,
  "layers": "840,1840",
  "journalCode": "jcard"
}
Response  404
HideShow
Body
{
  "success": false,
  "error": "not.found"
}

Get Card's transactions
GET/cards/{token}/transactions{?start,end,itc,currency,irc,order,length,offset,balance}

Example URI

GET http://localhost:8081/jcard/api/cards/token/transactions?start=&end=&itc=&currency=&irc=&order=&length=&offset=&balance=
URI Parameters
HideShow
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.

Request
HideShow
Headers
Content-Type: application/json
version: 1.0
consumer-id: c400ded2-f9cc-11e4-accc-3c15c2cf79f2
Response  200
HideShow
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"
    }
  ]
}

Generated by aglio on 27 Sep 2022