{cashier}
This section explains how to interact with Cashier API.
In some cases, customer activity within the Cashier requires an agent’s interaction — such as payout request approval, finalizing (capturing) an authorized deposit transaction, and other things.
Often, it is critical for business operations to respond to customer actions in real-time. However, it may not always be possible for an agent to react instantly.
To address this, the CRM system can call Cashier API
functions to perform the same actions an agent would normally take. This ensures that necessary actions are executed instantly upon customer activity, while still complying with regulatory requirements.
{danger.fa-exclamation-triangle} IMPORTANT 1:
The validation callback will only be triggered if thevalidation_url
is provided in the Cashier session request.
The Cashier session enables the customer to access the Cashier UI — an interface that presents the available payment methods, based on the merchant’s visibility rules, limits, and priorities.
{danger.fa-exclamation-triangle} IMPORTANT 2:
It is crucial that the redirect to the Cashier is performed from a browser, either by following the redirect link or embedding it in an iframe. This ensures the browser includes required headers such asOrigin
andReferer
, which our system uses to validate the request against the list of allowed domains for the application.
When you send a request to the Cashier API, you will receive a JSON response containing the redirect_url
parameter.
This redirect_url
should be used as the src
attribute of an iframe on your payment page within the merchant’s website. It will automatically authenticate the customer and display the Cashier interface.
Name | URL |
---|---|
Sandbox | https://pci-gw-test.praxispay.com/cashier/cashier |
Live | https://gw.praxisgate.com/cashier/cashier |
✓ - required value
? - optional, value or null
✕ - always appears as null
Variable | Type | Description | |
---|---|---|---|
merchant_id | varchar(50) | ✓ | Merchant API client account identifier. |
application_key | varchar(32) | ✓ | Identifier of your application (website). |
intent | varchar(32) | ✓ | Action to be taken within the cashier. Allowed values are: - authorization for authorization (hold) for the following capture. - payment for payment transaction. - withdrawal for withdrawal request. |
currency | varchar(10) | ✓ | Intended transaction currency. |
amount | int(20) | ? | Intended transaction amount in cents (send null to let the customer decide). Note: For certain currencies (see full list here) there is a fraction other than 100 cents per unit, this is important if you multiply by 100 to send the amount in cents. |
balance | int(20) | ? | Customer's withdrawable balance in cents. Can be used for automatic amount validation during the withdrawal request submission (send null to bypass the validation). Note: For certain currencies (see full list here) there is a fraction other than 100 cents per unit, this is important if you multiply by 100 to send the amount in cents. |
cid | varchar(50) | ✓ | Unique customer id in your system. Note: Personally Identifiable Information (PII), such as email addresses, is strictly forbidden. If your user identifier contains any PII, you must hash or encrypt it before sending it to Praxis. |
locale | varchar(5) | ✓ | User locale. See locales reference for the full list of supported locales. |
customer_token | varchar(32) | ? | HASH value of customer's identity. |
customer_data | <Object> | ? | Customer data object |
payment_method | varchar(50) | ? | Payment method. The gateway will override this value if provided. * gateway parameter is not applicable for Credit Card method for payouts; ** the predefined gateway hash value: "credit_card_cascade_gateway_0000" can be used instead of "payment_method": "Credit Card" for payments. Either gateway or payment method should be provided in case of 0-Auth and CIT transactions. |
gateway | varchar(32) | ? | For payment: hash of the gateway doing the processing. For withdrawal: hash of non-credit card gateway doing the processing. Either gateway or payment method should be provided in case of 0-Auth and CIT transactions. |
validation_url | varchar(256) | ? | URL to which the pre-deposit validation will be sent. |
notification_url | varchar(256) | ✓ | URL to which the deposit status notification will be sent. |
return_url | varchar(256) | ✓ | User will be redirected to a specified URL (relevant for cashier login, virtual terminal, 3D Secure and E-Wallet login redirect). |
order_id | varchar(50) | ✓ | Transaction identifier in your system. |
variable1 | varchar(256) | ? | Your custom field to tag the transaction with some necessary information. |
variable2 | varchar(256) | ? | Your custom field to tag the transaction with some necessary information. |
variable3 | varchar(256) | ? | Your custom field to tag the transaction with some necessary information. E.g. profile value for the customer which is sent from CRM to us. Note: If it is a new user that is not yet recorded in our system, it is needed to use customer_data “profile” parameter to set the needed profile level with the first transaction. |
version | varchar(3) | ✓ | API version |
timestamp | int(11) | ✓ | Request time (unix timestamp, seconds) |
mit | <Object> | ? | MIT object will contain the list of settings for processing merchant-initiated transactions (MIT). |
session_configuration | <Object> | ? | The object will contain overriding configuration rules for this session attempt. |
session_type | varchar(32) | ? | Type of the session. Allowed values are: - cashier, - payment_link. Payment Link type allows to initiate Cashier session with an extended lifetime (expires) - up to 72 hours. |
expires | int(11) | ? | Payment Link lifetime. The unix epoch timestamp (in seconds) when the login URL will expire (up to 72 hours from now). Used for payment_link session types only. If not set, the Payment Link lifetime will default to 15 minutes. |
cashier_ui_preset | varchar(256) | ? | Cashier UI Preset. If empty, the default preset for Cashier UI from the application configuration will be used. If not empty, the value will override the application configuration. |
Variable | Type | Description | |
---|---|---|---|
status | int | ✓ | API communication status - for transaction processing status please refer to transaction.transaction.status: - 0 if the request was successful. - Negative integer if internal server/network error occurs. - Positive integer if application/logical error occurs. |
description | varchar(256) | ✓ | Accurate description of the result. Return the actual error for any exception as it helps to diagnose issues in production. |
redirect_url | varchar(256) | ? | Cashier login URL. Appears as null for authentication/validation errors and expired session. |
customer | <Object> | ✓ | Customer object |
session | <Object> | ✓ | Session object |
version | varchar(3) | ✓ | API version |
timestamp | int(11) | ✓ | Response time (unix timestamp, seconds) |
The full signature generation algorithm can be found in the Authentication section.
Request signature parameters
merchant_id
application_key
timestamp
intent
cid
order_id
Response signature parameters
status
timestamp
redirect_url
customer.customer_token
{
"merchant_id": "Test-Integration-Merchant",
"application_key": "Sandbox",
"intent": "payment",
"currency": "USD",
"amount": 100,
"cid": "1",
"locale": "en-GB",
"customer_token": null,
"customer_data": {
"country": "GB",
"first_name": "John",
"last_name": "Johnson",
"dob": "12\/31\/1980",
"email": "[email protected]",
"phone": "44201112222",
"zip": "WC2N 5DU",
"state": "JS",
"city": "London",
"address": "Random st., 12\/3"
},
"payment_method": null,
"gateway": null,
"validation_url": null,
"notification_url": "https:\/\/api.merchant.com\/v1\/deposits\/tx-1560610955",
"return_url": "https:\/\/merchant.com\/payment_result\/tx-1560610955",
"order_id": "test-1560610955",
"variable1": "your variable",
"variable2": "if that is not enough, you can pass even one more variable",
"variable3": null,
"version": "1.3",
"timestamp": 1590611635
}
{
"status": 0,
"description": "Ok",
"redirect_url": "https:\/\/compute.praxispay.com\/login\/8a7sd87a8sd778ac961062c6bedddb8",
"customer": {
"customer_token": "87cfb23a8f1e68e162c276b754d9c061",
"country": "GB",
"first_name": "John",
"last_name": "Johnson",
"avs_alert": 0,
"verification_alert": 0
},
"session": {
"auth_token": "8a7sd87a8sd778ac961062c6bedddb8",
"intent": "payment",
"session_status": "created",
"order_id": "test-1560610955",
"currency": "EUR",
"amount": 100,
"conversion_rate": 1.000000,
"processed_currency": "EUR",
"processed_amount": 100,
"payment_method": "WireOnline",
"gateway": null,
"cid": "1",
"variable1": "your variable",
"variable2": "if that is not enough, you can pass even one more variable",
"variable3": null
},
"version": "1.3",
"timestamp": 1590611635
}
If the merchant prefers to open the Cashier in an iframe instead of a new window or full-page view, the following information may be helpful:
Minimum dimensions (in pixels) for desktop to display the Cashier frame without scrollbars:
The examples below are based on the Deposit Credit Card payment method (which includes a fixed set of additional fields):
The display of elements inside the frame is fully adaptive.