Pre Auth
Hosted Payment Form (Pre Auth)
Prerequisites
Sale
docsSECRET_KEY
, WEBHOOK_SECRET_KEY
provided by Datman.Process Flow Diagram
Environments
Environment | Base URL |
---|---|
Sandbox | https://ws2-payments.datmanpay.com |
Production | http://payments.datmanpay.com |
Step-by-Step Integration Guide
1. Prepare Your Payload
Sale
documentation, with a few additional keys.Please review the keys below — they represent only the additional parameters required.
Key | Description | Status | Example |
---|---|---|---|
authorisation_type | Authorisation Type value (Expexted value: PreAuth) | Required | 'PreAuth' |
2. Encrypt Your Payload
Node.js Encryption Example:
3. Construct the Hosted Payment URL
https://<BASE_URL>/opto/card.php?data=<ENCRYPTED_DATA>
https://ws2-payments.datmanpay.com/opto/card.php?data=U2FtcGxlRW5jcnlwdGVkRGF0YQ==
4. Redirect the User
After payment completion:
redirect_url
cancel_url
Error Handling
Error Code | Reason | Suggested Action |
---|---|---|
Unable to process this request! | Missing required key | Verify that all required keys are present |
Invalid secret | Invalid encryption or secret mismatch | Check your secret key length and initialization vector (IV) |