Presentation logo

Cashier API | init-pay-in


init-pay-in is the mechanism for a quick access to the cashier using REST API.

When executing the request, you receive json response that contains redirect_url parameter. The redirect_url parameter is a link that will automatically do the customer login to Cashier.

ENDPOINTS

Name URL
Sandbox https://gateway-test.praxispay.com/api/init-pay-in
Live https://gateway.praxispay.com/api/init-pay-in

CHECKLIST

Please contact your account manager or technical support representative in order to confirm the following merchant acccount settings.

Item Purpose
Cashier API v1.1 Required for Cashier API to be allowed your CRM.
Dynamic Return URL Required for return_url to work properly.
Merchant ID and Merchant Secret Required. The merchant credentials will be provided by the Praxis Technical Support representative.
Backoffice and VT - yes/no If you consider using Praxis Backoffice and VT for customer management, please make sure to provide the Customer Sync callback URL to Praxis Technical Support representative.

REQUEST PARAMETERS

Variable Type Description
signature varchar(96) Required. Request signature. Please refer to How to Build Signature for details on signing the request.
merchant_id varchar(50) Required. Merchant API client account identifier
frontend varchar(256) Required. Cashier FrontEnd name, normally it is a common name of the website. Linked to a specific base currency.
locale varchar(5) Required. User locale. For ex.: en-GB
payment_method varchar(10) Optional. For ShopPing Cart. Payment method that will be used for processing
currency varchar(10) Required. Customer currency
pin varchar(50) Required. Unique customer id in your system
requester_ip varchar(10) Optional. Customer's IP address
first_name varchar(25) Required. Customer's first name
last_name varchar(25) Required. Customer's last name
dob date Optional. Date of birth of the customer. MM/DD/YYYY format accepted.
email varchar(50) Required. Customer's email
address varchar(50) Optional. Customer's address
city varchar(50) Optional. City of the customer
country varchar(2) Required. ISO 3166-1 alpha-2 (US, MT, IT, GB, DE etc)
state varchar(2) State/Province where the customer resides. Only for US, CA and AU. 2 characters ISO format. Otherwise leave blank.
zip varchar(12) Required. Postal Code of the customer. Only required for US and CA. Can provide values for other countries. Limited to 12 alphanumeric characters only.
phone int(20) Optional. Numeric only, includes country area code. Should not be a dummy sequence like 123456 or 111111, should be at least 6 digits long.
return_url varchar(50) Required. User will be redirected to a specified URL after successful deposit (except cases when there is another rule defined with higher priority)
validation_url varchar(50) Required. URL to which the deposit validation request will be sent. Please refer to Validation for more details.
notification_url varchar(50) Required. URL to which the deposit status notification will be sent. Please refer to Notification for more details.
timestamp int(11) Required. Request time. URL will be active during 1 min after this time
version varchar(3) Required. API version

RESPONSE PARAMETERS

Variable Type Description
status int Required.
- 0 if the request was successful
- Negative integer if internal server/network error occurs
- Positive integer if application/logical error occurs
description varchar(75) Required. Accurate description of the result. Return the actual error for any exception as it helps to diagnose issues in production
version varchar(3) Required. API version
signature varchar(96) Required. sha384 HASH code of response (same as in request)
redirect_url varchar(256) Required. Cashier Autologin URL. When redirected to this URL, the customer will be navigated further to the Cashier deposit page
auth_token varchar(75) Required. Special token that allows the customer to login during 15 min

EXAMPLE

Request

curl -X POST \ https://gateway-test.praxispay.com/api/init-pay-in \
-H 'Content-Type: application/json' \
-d '{"address":"Blue Street 1",
    "city":"London",
    "country":"GB",
    "dob":"1981-09-05",
    "email":"[email protected]",
    "first_name":"Tom",
    "frontend":"Sandbox USD",
    "last_name":"Doe",
    "locale":"en-GB",
    "merchant_id":"praxis_test_user",
    "notification_url":"https:\/\/api.merchant.com\/praxis\/notification\/",
    "payment_method":"PraxisCC1",
    "phone":"6712332112",
    "pin":"123",
    "requester_ip":"216.111.222.123",
    "return_url":"https:\/\/merchant.com\/order\/thank_you_page",
    "timestamp":1561914770,
    "validation_url":"https:\/\/api.merchant.com\/v1\/validate_deposits\/fxodWAQVvc9SRxhDaWSJJC21f",
    "version":"1.1",
    "zip":"01234",
    "signature":"414235dc4bcb872067df6563bee201e285bee9b6b3a22f5c998d2b7521df08d77434780a0b9080cc790961b53a9d806e"}'

Response (OK)

{
    "auth_token":"eb2a7a96b3d5ff60c961062c6bedddb8",
    "description":"Success",
    "redirect_url":"https://compute.praxispay.com/autologin-form/eb2a7a96b3d5ff60c961062c6bedddb8",
    "status":0,
    "version":"1.1",
    "signature":"76a6fd27676ed0851f156ae97b82d70de79e8c68f72aa9eec242d52c465bd219bf7851323d8a001a38fa6df318da86a1"
}

Response (ERR)

{
    "description":"Timestamp expired",
    "status":1,
    "version":"1.1",
    "signature":"f133707017c1ad1586a07be4d45e74aaaeca6f0b035b74f4d4a519efdc7f162c0e3007a1573517d230c4829b2baf58f2"
}