API documentation

Create Booking with Payment V1

Our platform is integrated with Netopia MobilPay and for the moment we use their sandbox platform. For further details please contact us.
Only for testing you can use the following cards that are accepted by the sandbox platform:

9900004810225098 - accepted card with CVV=111
9900541631437790 - expired card

POST /api/car_driver/smart_keys/create_booking

Include access_token in HTTP header:

Authorization: Bearer 09ba487fc3df...

Description

This web service is used to create a booking in our database and receive information that should be used to create the actual payment on the remote payment service.

REQUEST PARAMETERS

Parameter name Parameter type Description
return_url string Base64(return_url) url where the payment service will redirect after the payment
secured_parking_id int id of the parking on what the user does the booking
smart_key object object containing the booking form data
start_time datetime start_time of booking
end_time datetime end-time of the booking
email string the email of the user
description string this is optional
{
  "return_url" : "aHR0cHM6Ly93d3cuZXhhbXBsZS5jb20v",
  "smart_key" : {
    "email" : "email@example.com",
    "start_time" : "2015-04-28 15:00:00",
    "end_time" : "2015-04-28 17:00:00",
    "secured_parking_id" : 187,
    "description" : "description text"
  }
}

Response

Status Code: 201 if OK

{
  "smart_key": {
    "id": 12,
    "secured_parking_id": 1756,
    "name": "name",
    "description": "description text",
    "start_time": "2014-10-10T10:33:19Z",
    "end_time": "2014-10-10T12:03:19Z",
    "duration_minutes": 90,
    "price": "3.0",
    "currency": "RON",
    "type": "actual",
    "with_payment": true
  },
  "pay_url" : "<<pay_url>>",
  "is_card_verification" : true,
  "env_key" : "<<env_key>>",
  "data" : "<<data>>"
}

Response parameters

Parameter name Parameter type Description
smart_key object object containing information about the booking created
id int id of the payment
secured_parking_id int ...
name string the name of the secured_parking
description string description of the booking
start_time string parking start time
end_time string parking end time
duration_minutes int desired duration for the parking in minutes
price string price of the parking
currency string currency configured on the parking
type string one of: actual/past/future
with_payment boolean whether Bookings are with Payment
pay_url string url to be used to post the env_key and data parameters in order to make a payment
is_card_verification bool true if there was no card created and a card is about to be created
env_key string key to be sent to pay_url link in order to create a payment
data string data to be sent to pay_url link in order to create a payment

Using these three params:

       "pay_url" : "<<pay_url>>",
       "env_key" : "<<env_key>>",
       "data" : "<<data>>"

You have to make a POST to the pay_url with the other two params. This will redirect the user to the mobilPay web site that will make the actual payment and redirect to given return_url.

Status Code: 400 if return_url is missing

Status Code: 401 if request access token not ok

Status Code: 404 if zone_id or car_id not ok

Status Code: 422 if there were errors (messages included in body)


Create Booking with Payment V2

V2 also integrates the EPX payment provider and it's in testing mode for now.
Only for testing you can use the following card that is accepted by EPX's testing platform:

4000000000000002 - accepted card with CVV=123, EXP_DATE=12/2025, ADDRESS=123 NN CENTRAL, ZIP=12345

When the MobilPay provider is set on platform you can use the MobilPay cards from V1.

POST /api/car_driver/smart_keys/create_booking

Include access_token and version in HTTP headers:

Authorization: Bearer 09ba487fc3df...
Accept: application/vnd.parkingplus.v2+json"

Description

Same as for v1.

REQUEST PARAMETERS

Same as for v1.

Response

Status Code: 201 if OK

{
  "smart_key": {
    "id": 12,
    "secured_parking_id": 1756,
    "name": "name",
    "description": "description text",
    "start_time": "2014-10-10T10:33:19Z",
    "end_time": "2014-10-10T12:03:19Z",
    "duration_minutes": 90,
    "price": "3.0",
    "currency": "RON",
    "type": "actual",
    "with_payment": true
  },
  "pay_url" : "<<pay_url>>",
  "pay_params": {
    "env_key" : "<<env_key>>",
    "data" : "<<data>>"
  },
  "is_card_verification" : true
}

Response parameters

Parameter name Parameter type Description
smart_key object object containing information about the booking created
id int id of the payment
secured_parking_id int ...
name string the name of the secured_parking
description string description of the booking
start_time string parking start time
end_time string parking end time
duration_minutes int desired duration for the parking in minutes
price string price of the parking
currency string currency configured on the parking
type string one of: actual/past/future
with_payment boolean whether Bookings are with Payment
pay_url string url to be used to post the env_key and data parameters in order to make a payment
pay_params object object containing the parameters to be sent to pay_url in order to make a payment
env_key string key to be sent to pay_url link in order to create a payment
data string data to be sent to pay_url link in order to create a payment
is_card_verification bool true if there was no card created and a card is about to be created

Note: The "pay_params" above are for when the MobilPay provider is enabled. And the pay_url, env_key and data can be used to create a payment the same way as for v1.

For when EPX provider is enabled the "pay_params" will look like this:

  "pay_params": {
    "cust_nbr": "<<cust_nbr>>",
    "merch_nbr": "<<merch_nbr>>",
    "dba_nbr": "<<dba_nbr>>",
    "terminal_nbr": "<<terminal_nbr>>",
    "tran_nbr": 1,
    "batch_id": "0320170706",
    "amount": "2.00",
    "tac": "<<TAC token>>",
    "receipt": "N",
    "redirect_url": "http://www.example.com/api/epx/confirm",
    "redirect_echo": "V",
    "response_url": "http://www.example.com/",
    "response_echo": "V",
    "invalid_redirect_url": "http://www.example.com/api/epx/invalid",
    "custom_javascript_url": "https://s3-us-west-1.amazonaws.com/panappark-production/paypage/epx_paypage.js",
    "custom_css_url": "https://s3-us-west-1.amazonaws.com/panappark-production/paypage/epx_paypage.css"
  }

You have to make a POST to pay_url with the parameters inside pay_params. This will redirect the user to the EPX web site that will make the actual payment and redirect to the redirect_url.

Status Codes: 401, 404 and 422 are the same as for v1


Create Booking with Payment V4

V4 also integrates the EPX payment provider and it's in testing mode for now.
Only for testing you can use the following card that is accepted by EPX's testing platform:

4000000000000002 - accepted card with CVV='', EXP_DATE=12/2025

When the MobilPay provider is set on platform you can use the MobilPay cards from V1.

POST /api/car_driver/smart_keys/create_booking

Include access_token and version in HTTP headers:

Authorization: Bearer 09ba487fc3df...
Accept: application/vnd.parkingplus.v4+json"

Description

This web service is used to create a booking in our database and receive a link that should be used to continue with the actual payment on the remote payment service when required.

REQUEST PARAMETERS

Same as for v1.

Response

Status Code: 201 if OK

{
  "smart_key": {
    "id": 12,
    "secured_parking_id": 1756,
    "name": "name",
    "description": "description text",
    "start_time": "2014-10-10T10:33:19Z",
    "end_time": "2014-10-10T12:03:19Z",
    "duration_minutes": 90,
    "price": "3.0",
    "currency": "RON",
    "type": "actual",
    "with_payment": true
  },
  "pay_url" : "<<pay_url>>",
}

Response parameters

Parameter name Parameter type Description
smart_key object object containing information about the booking created
id int id of the payment
secured_parking_id int ...
name string the name of the secured_parking
description string description of the booking
start_time string parking start time
end_time string parking end time
duration_minutes int desired duration for the parking in minutes
price string price of the parking
currency string currency configured on the parking
type string one of: actual/past/future
with_payment boolean whether Bookings are with Payment
pay_url string url to be used to make a GET request in mobile WebView in order to continue with the payment

Note: After the actual payment is finished on the remote payment service it will redirect to the redirect_url request parameter.

Status Codes: 400, 401, 404 and 422 are the same as for v1