ECIM Common Payment API

The ECIM Common Payment API provides a set of methods which allow to issue payment requests on behalf of a user for his parking sessions. It is expected that the service providers offering a payment API will be different from country to country and that generally existing payment APIs are hard to change or update due to the nature of the transactions made. This being said, a set of wrappers would have to be developed in order to transform calls to the ECIM Common Payment API into calls which can be accepted by the respective payment API.

 Request payment authorisation

Method Endpoint
[POST]
/ecim_transaction_authorization
Description of the Service
This method allows requesting a payment authorization.
Input
Parameter and Value Brief Description
Phone_number, String, required User’s phone number
ECIM_id, String, required End-user’s ECIM id. Must belong to a user with valid credit card
Amount, Double, required The amount to be paid
Developer_id, String, required The id of the developer (e.g. ecim_dev_522) in the ECIM platform (usually referred as merchant_id in payment systems.
Example Request

platform.ecim-cities.eu/provider/ecim_transaction_authorization

{

Phone_number : 3249048538

ecim_id : ashguew827362873jsah

amount : 4,5

developer_id : kjh35234j2noc8am2h0flg83hpj

}

Outputs
Parameter and Value Brief Description
Authorisation_id, String, required The authorisation id
Status, JSONArray, required Successful/failure status (e.g. {“code”: 200, “text”: “OK”})
Date, String, required The date of the authorization
ECIM_id, String, required User’s ECIM id.
Example Response

{

“authorization_id”:”apld32443dbtf44k4″,

“status”:{

“code”:”200″,

“text”:”OK”

     },

“date”:”1429890793″,

“cost”:”12.2″,

“ECIM_ID”:”IKDMDE83K3LDPE09″

}

Request a payment transaction

Method Endpoint
[POST]
/ecim_payment
Description of the Service
This method allows requesting a payment transaction.
Input
Parameter and Value Brief Description
Phone_number, Long, required User’s phone number
ECIM_id, String, required User’s ECIM id. Must belong to a user with charging options
Amount, Double, required The amount to be paid
Developer_id, String, required The id of the developer (e.g. ecim_dev_522) in the ECIM platform (usually referred as merchant_id in payment systems.
Authorization_id, String, required The authorization_id provided by the ECIM_Transaction_Authorization request
Example Request

platform.ecim-cities.eu/provider/ecim_payment

{

      Phone_number : 3249048538

      ecim_id : ashguew827362873jsah

      amount : 4,5

      developer_id : kjh35234j2noc8am2h0flg83hpj

      authorization_id : c9dcd9f4-e5af-11e4-bbef-00505688528c

}

Outputs
Parameter and Value Brief Description
Transaction_id, String, required The transaction_id
Status, JSONArray, required Successful/failure status (e.g. {“code”: 200, “text”: “OK”})
Date, String, required The date of the authorization
ECIM_id, String, required User’s ECIM id.
Message, JsonArray , required A text response
Authorization_id, String, required The authorization id
Example Response

{

    “transaction_id”:”apl666443dbtpao13″,

    “status”:{

               “code”:”200″,

               “text”:”OK”

},

    “date”:”1429890793″,

    “ECIM_ID”:”IKDMDE83K3LDPE09″,

    “message”:”Success”,

    “authorization_id”:”apld32443dbtf44k4″

}

Request a list of user’s transactions

Method Endpoint
[POST]
/ecim_transaction_history
Description of the Service
This method allows retrieving transaction history.
Input
Parameter and Value Brief Description
Phone_number, Long, required User’s phone number
ECIM_id, String, required User’s ECIM id. Must belong to a user with charging options
Developer_id, String, required The id of the developer in the ECIM platform (usually referred as merchant_id in payment systems.
Example Request

platform.ecim-cities.eu/provider/ecim_transaction_history

{

      Phone_number : 3249048538

      ecim_id : ashguew827362873jsah

      developer_id : j3245b9dflk2349033

}

Outputs
Parameter and Value Brief Description
Trans, JSONArray of JSONObjects A list of all the user transactions (transaction structures)
Transaction structure
Transaction_id, String, required The transaction_id
Status, JSONArray, required Successful/failure status (e.g. {“code”: 200, “text”: “OK”})
Amount, Double, required The amount to be paid
Date, String, required The date of the authorization
Message, JSONArray, required A text response
Example Response

 {

 transactions:[

   {

    “transaction_id”:”apl666443dbtpao13″,

    “status”:{

               “code”:”200″,

               “text”:”OK”

                  },

    “amount”:”6.80″,

    “date”:”1429890793″,

    “message”:”Success”,

  },

  {

    “transaction_id”:”apl666443dbtpao13″,

    “status”:{

               “code”:”200″,

               “text”:”OK”

                  },

    “amount”:”6.80″,

    “date”:”1429890793″,

    “message”:”Success”,

  },

  …]

}

Get payment status

Method Endpoint
[POST]
/ecim_transaction_status
Description of the Service
This method allows getting the status of a transaction.
Input
Parameter and Value Brief Description
Provider_id, String, required Payment provider id (provided by ECIM marketplace in subscription)
Transaction_id, String, required The transaction_id
Example Request

platform.ecim-cities.eu/provider/ecim_transaction_status

{

      Provider_id : be8899

      Transaction_id : 551b892c-ce1b-11e4-b4ac-00505688528c

}

Outputs
Parameter and Value Brief Description
Status, JSONArray, required Successful/failure status (e.g. {“code”: 200, “text”: “OK”})
Date, String, required The date of the authorization
Message, JSONArray, required A text response
Example Response

 {

    “status”:{

               “code”:”200″,

               “text”:”OK”

                  },

    “date”:”1429890793″,

    “message”:”Success”

}

Request a user’s credit card registration

Method Endpoint
[GET]
/ecim_credit_registration?ecim_id=<ecim_id>
Description of the Service
This method allows requesting a user’s credit card registration.
Input
Parameter and Value Brief Description
ECIM_id, String, required User’s ECIM id. Must belong to a user with charging options
Example Request
platform.ecim-cities.eu/provider/ecim_credit_registration?ecim_id= ashguew827362873jsah
Outputs
Parameter and Value Brief Description
Registration_url, URL, required The registration URL. This URL will open a form with credit cards fields to be field.
Example Response

{

    “url”:”https://creditcardform.com”

}

Request a user’s credit card validation

Method Endpoint
[GET]
/ecim_credit_validation?ecim_id=<ecim_id>
Description of the Service
This method allows requesting a user’s credit card validation.
Input
Parameter and Value Brief Description
ECIM_id, String, required End-User’s ECIM id.
Example Request
platform.ecim-cities.eu/provider/ecim_credit_validation?ecim_id=ashguew827362873jsah
Outputs
Parameter and Value Brief Description
Status, JSONArray, required Credit card validation status (valid, not valid)
Example Response

{

    “status”:”valid”

}