# Capture
# Endpoint
http://{terminalIp}/devices/cat/authorizeCompletion
# Request
Property | Type | Description |
---|---|---|
HTTP Headers | ||
Signature | String | Sha-256 hmac of the json payload. |
Content-Type | text/plain | Even if the payload is a JSON object, POS Bridge parses it as a string, therefore it is important to parse content-type as "text/plain" otherwise, the authentication fails. |
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. Amount to capture in cents. If not provided full amount will be captured. |
tipAmount | int | Optional. Tip amount in cents. If not provided, full tipAmount will be captured. |
# 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 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 | ||
action | String | "CAPTURE" |
status | String | "CAPTURED" |
links | JSON Array | List of link objects showing the relationship of this capture with other transactions. Link object properties: href - transaction id or a related transaction method - GET. HTTP verb to use to pull this resource rel - how the transaction is related to this transaction. In the example below, it's the transaction id of the authorization that now has been captured |
# Request Example
POST /devices/cat/authorizeCompletion HTTP/1.1
Host: 127.0.0.1:55555
User-Agent: curl/7.43.0
Accept: */*
Content-Type: text/plain
Signature: a0e0131cfefc4c622baadd0ad24301afcdbf1862608fb11ade9ef3cc7de60b62
Content-Length: 232
{
"poyntRequestId": "06C12A34-BE38-497D-B6F0-F4F4C193B746", "transactionId": "29616c32-998c-4383-8002-34dec0249a8b", "timeout": 60000,
"payment": {
"amount": 3000,
"tipAmount":1000
},
"timeout": 60000,
"transactionId": "29616c32-998c-4383-8002-34dec0249a8b"
}
# Response Example
TIP
Please keep in mind we are only showing key properties in the response.
HTTP/1.1 200 OK
Connection: Keep-Alive
Signature: 1D4CBE0807D5DA60E3DDE461B05D5A87886379A135D0D53234FCF4EDCCAC7D8A
Content-Length: 2771
Content-Type: application/json
{
"payment": {
"transactions": [
{
"action": "CAPTURE",
"links": [
{
"href": "29616c32-998c-4383-8002-34dec0249a8b",
"method": "GET",
"rel": "AUTHORIZE"
}
],
"status": "CAPTURED",
← Adjustment Refund →