Customer Sync
Customer Sync is the mechanism that allows the agent to manage the customers, their deposits and payouts within Virtual Terminal.
When the agent attempts to access the virtual terminal for customer, Backoffice will attempt to retrieve the customer details from CRM. In order to have the retrieval working, the CRM will need to implement the API callback that will be available to receive the request from and respond with the customer details.
{danger.fa-exclamation-triangle} IMPORTANT: Please make sure that you have provided the callback URL to technical support representative before you attempt to use Virtual Terminal.
Variable | Type | Description | |
---|---|---|---|
merchant_id | varchar(50) | ✓ | Merchant API client account identifier |
application_key | varchar(50) | ✓ | Cashier Application key, normally it is a common name of the website. Linked to a specific base currency. |
cid | varchar(50) | ✓ | Unique customer id in your system |
timestamp | int(11) | ✓ | Request time. URL will be active during 1 min after this time |
version | varchar(3) | ✓ | API version |
Variable | Type | Description | |
---|---|---|---|
status | int | ✓ | API communication 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 |
customer_data | <Object> | ? | Customer object. Appears as null in case of authentication/validation error. |
manual_validation_url | varchar(256) | ? | URL to which the manual deposit validation request will be sent. Please refer to Validation for more details. |
manual_notification_url | varchar(256) | ? | URL to which the manual deposit status notification will be sent. Please refer to Notification for more details. |
balance | int(20) | ✓ | Customer's current available balance. Please 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 |
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
cid
Response signature parameters
status
timestamp
manual_validation_url
manual_notification_url
balance
curl -X POST \ https://api.merchant.com/v1/sync/ \
-H 'Content-Type: application/json' \
-d '{
"application_key":"Praxis TEST USD",
"merchant_id":"Test-Integration-Merchant",
"cid":"123",
"timestamp":1561206408,
"version":"1.3"
}'
{
"status":0,
"description":"OK",
"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",
"profile": 1
},
"manual_notification_url":"https://api.merchant.com/v1/deposits/fxodWAQVvc9SRxhDaWSJJC21f",
"manual_validation_url":"https://api.merchant.com/v1/validate_deposits/fxodWAQVvc9SRxhDaWSJJC21f",
"balance": 0,
"version":"1.3",
"timestamp":1561279426
}
{
"status":1,
"description":"Customer not found",
"customer_data":null,
"version":"1.3",
"timestamp":1561207146
}