# Adjustment
The adjustment operation allows adjusting base sale amount, tip amount or both.
# Endpoint
http://{terminalIp}/devices/cat/authorizeAdjustment
# Request
Property | Type | Description |
---|---|---|
HTTP Headers | ||
Signature | String | Sha-256 hmac of the JSON payload. |
Content-Type | text/plain | Even the payload is a JSON object, POS Bridge parses it as a string, therefore it is important to pas content-type as "text/plain" otherwise the authentication will fail. |
JSON | ||
poyntRequestId | String | UUID of the request. |
transactionId | String | Poynt transaction ID of the previously created authorization. |
timeout | int | Client timeout in milliseconds |
payment | JSON Object | Contains options for the payment session. Encloses all the properties below. |
amount | int | Optional. Adjusted sale amount in cents. |
tipAmount | int | Optional. Adjusted tip amount in cents. |
# Response
NOTE
Most of the response properties are the same as what has already been described in the Sale section. To avoid repetition the table below only lists the 2 new values.
Property | Type | Description |
---|---|---|
HTTP Headers | ||
Content-Type | application/json | Content-type of the payload. |
Signature | String | Sha-256 hmac of the json payload. |
JSON | ||
Transaction Properties | ||
adjusted | boolean | True if any of the authorization fields have been updated. |
amountsAdjusted | boolean | true if the base amount (orderAmount) or tipAmount have been adjusted. |
# Request Example
POST /devices/cat/authorizeAdjustment HTTP/1.1
Host: 127.0.0.1:55555
User-Agent: curl/7.43.0
Accept: */*
Content-Type: text/plain
Signature: 5306cda8c3871bcfc49371c3449b8444729aee90d9f29f73227cf98f9dfb063a
Content-Length: 250
{
"poyntRequestId": "095DA086-B511-48B8-8A0B-95E61BFD010D", "transactionId": "29616c32-998c-4383-8002-34dec0249a8b", "timeout": 60000,
"payment": {
"amount": 3000,
"tipAmount": 1000
}
}
# Response Example
TIP
In this examples, we are only showing the most relevant part of the response.
HTTP/1.1 200 OK
Signature: 6B9D0D17228867D60F5729DC940EA1F888B07034C88B7EB410F60BDB7C376277
Content-Length: 2969
Content-Type: application/json
{
"payment": {
"transactions": [
{
"action": "AUTHORIZE",
"adjusted": true,
"amounts": {
"cashbackAmount": 0,
"currency": "USD",
"customerOptedNoTip": false,
"orderAmount": 3000,
"tipAmount": 1000,
"transactionAmount": 4000
}
"amountsAdjusted": true,
"authOnly": false,
},