Get Transaction Intent Details
Once the (presented by the customer) QR Code is scanned (by the Cashier) the Distributor POS System need to retrieve the transaction intent (= QR Code) attributes. For that purpose the following Distributor Backend -> Zastrpay Backend API call must be implemented:
- http
- curl
GET https://host.com/transaction-service/v1/transaction-intents/{trxIntentId}
Content-Type: application/json
x-api-key: $apiKey
x-triggered-by-shop-id: 5d4d122c-889d-4033-b9c1-58b3a661923a
x-triggered-by-shop-external-reference: Aaa-Bbb-Ccc-123
curl -0 -v -k -X GET https://host.com/transaction-service/v1/transaction-intents/{trxIntentId} \
-H 'Content-Type: application/json; charset=utf-8' \
-H "x-api-key: $apiKey"
-H "x-triggered-by-shop-id: 5d4d122c-889d-4033-b9c1-58b3a661923a" \
-H "x-triggered-by-shop-external-reference: Aaa-Bbb-Ccc-123"
Zastrpay Backend will answer with the following response:
200 OK
{
"id": "40c7fe9f-3bf9-464a-8d3a-937db20f5dae",
"amount": 100,
"currency": "EUR",
"customerId": "111abc22-33de-4444-5555-111111111111",
"type": "PassthroughDeposit",
"state": "Pending",
"createdOn": "2019-01-31T11:50:59Z"
}
x-triggered-by-shop
headersTo identify the source of the API call, the following headers are used:
x-triggered-by-shop-id
- a UUID/GUID generated by Zastrpay upon initial shop registrationx-triggered-by-shop-external-reference
– An alphanumeric reference (including dot, hyphen and space, up to 48 characters long) which should be unique within all shops of a distributor Exactly one of the above headers be provided.
A customer can have only 1 transaction intent / QR Code active at a time (regardless if for Deposit or Withdrawal). To create a new one the customer would need to cancel the existing one first.
The state
must be Pending
for the transaction intent / QR Code to be processed. In case of any other state the processing should be abandoned, and the customer should be asked to generate a new/valid QR Code.
See Get Transaction Intent By Id API Reference for more information.