Transactions Endpoints - POS API
These are all of the necessary endpoints required for Transactions (purchases, authorizations, captures, releases, returns).
- 1 POST /client-id/{client_id}/transactions
- 2 POST /client-id/{client-id}/authorization
- 3 POST /client-id/{clientId}/authorization/{authorizationId}/release
- 3.1 Request Parameters:
- 3.2 Example Request:
- 3.3 Response Parameters:
- 3.4 Success Response:
- 4 POST /client-id/{clientId}/authorization/{authorizationId}/capture
- 5 POST /client-id/{clientId}/authorization/{authorizationId}/capture/{captureId}/return
- 6 POST /client-id/{client_id}/accounts/{account_number}/refund
- 7 GET /client-id/{clientId}/authorizations
- 7.1 Request Parameters:
- 7.2 Response Parameters:
- 7.3 Success Response:
- 8 GET /client-id/{clientId}/authorization/{authorizationId}
- 8.1 Request Parameters:
- 8.2 Response Parameters:
- 8.3 Success Response:
- 9 GET /client-id/{clientId}/captures
- 9.1 Request Parameters:
- 9.2 Response Parameters:
- 9.3 Success Response:
POST /client-id/{client_id}/transactions
https://{posapi_url}/flexiti/pos-api/v2.5.1/client-id/{client_id}/transactions?lang=en
This service is the one used to post Deposits, In-Store Payments or Trade-Ins on the Customer Account.
You can post a transaction using one of the following: FlexitiCard number (VCC), Account number, or Customer ID.
Request Parameters:
Type | Parameter | Required | Details |
---|---|---|---|
HEADER | authorization | Yes |
|
HEADER | x-reference-id | Yes |
|
HEADER | x-idempotency-key | No |
|
HEADER | x-context-hash | No |
|
PATH | client_id | Yes |
|
QUERY | lang |
| |
BODY | transaction_type |
|
|
BODY | amount |
| |
BODY | vcc_number |
| |
BODY | account_number |
| |
BODY | customer_id |
| |
BODY | verification_code | Yes |
|
BODY | request_id | Yes for in-store channel |
|
BODY | external_location_id | Yes for in-store channel |
|
BODY | external_employee_id | Yes for in-store channel |
|
Example Request:
Deposit
{
"verification_code": 1234,
"transaction_type": "deposit",
"amount": "10.00",
"account_number": "20076677",
"request_id": "34561234", //if in-store channel
"external_location_id" : "00-12345", //if in-store channel
"external_employee_id" :"12345-SMITH" //if in-store channel
}
In-store Payment
{
"verification_code": 1234,
"transaction_type": "instore_payment",
"amount": "120.05",
"account_number": "20076677",
"request_id": "34561234", //if in-store channel
"external_location_id" : "00-12345", //if in-store channel
"external_employee_id" :"12345-SMITH" //if in-store channel
}
Trade-In
{
"verification_code": 1234,
"validation": 390903,
"transaction_type": "tradein",
"amount": "120.05",
"account_number": "20076677",
"request_id": "34561234", //if in-store channel
"external_location_id" : "00-12345", //if in-store channel
"external_employee_id" :"12345-SMITH" //if in-store channel
}
Success Response:
200 - Success - Deposit
{
"payment_protection": false,
"transaction_id": 167638,
"apr": 37.24,
"available_credit": 3528.93,
"term": "",
"admin_fee": 0,
"balance_after_purchase": 3528.88,
"payment_value": "0.05",
"promotional_amount": 0.05,
"air": 37.24,
"customer_confirmed": false,
"plan_id": 0,
"verified": true
}
200 - Success - In-Store payment & Trade-in
{
"transaction_id": "696952",
"customer_name": "John",
"customer_lname": "Smith",
"total_amount": "120.05000",
}
POST /client-id/{client-id}/authorization
https://{posapi_url}/flexiti/pos-api/v2.5.1/client-id/{client_id}/authorization
NOTE: the /authorization endpoint has been updated to version 2.5.1, reflected in the URI.
This endpoint to creates a credit authorization for a customer from a specific Merchant.
Credit authorizations could be for:
promotional purchases
regular purchase
Request Parameters:
Type | Parameter | Required | Details |
---|---|---|---|
HEADER | authorization | Yes |
|
HEADER | x-reference-id | Yes |
|
HEADER | x-idempotency-key | No |
|
HEADER | x-context-hash | No |
|
PATH | client_id | Yes |
|
QUERY | lang |
| |
BODY | account_number | Yes |
|
BODY | vcc_number |
|
|
BODY | reference | No |
|
BODY | financing_option.transaction_type | Yes |
|
BODY | financing_option.plan_id | Yes for transaction_type = promotional_purchase |
|
BODY | financing_option.term |
|
|
BODY | amount |
|
|
BODY | auto_capture | Yes |
|
BODY | verification_code | Yes for in-store POS integrations. Not to be passed for Online implementations using the Widget |
|
BODY | sku_data.purchase_order | No |
|
BODY | sku_data.shipping_total | No |
|
BODY | sku_data.register_id | No |
|
BODY | sku_data.transaction_discount_total | No |
|
BODY | sku_data.transaction_subtotal | No |
|
BODY | sku_data.gst_hst | No |
|
BODY | sku_data.pst | No |
|
BODY | sku_data.transaction_total | No |
|
BODY | sku_data.products.sku_id | No |
|
BODY | sku_data.products.category | No |
|
BODY | sku_data.products.description | No |
|
BODY | sku_data.products.quantity | No |
|
BODY | sku_data.products.unit_price | No |
|
BODY | sku_data.products.extended_price | No |
|
BODY | billing_information.first_name | Yes if Online Channel |
|
BODY | billing_information.last_name | Yes if Online Channel |
|
BODY | billing_information.address_1 | Yes if Online Channel |
|
BODY | billing_information.address_2 | Yes if Online Channel |
|
BODY | billing_information.city | Yes if Online Channel |
|
BODY | billing_information.province | Yes if Online Channel |
|
BODY | billing_information.postal_code | Yes if Online Channel |
|
BODY | shipping_information.first_name | Yes if Online Channel |
|
BODY | shipping_information.last_name | Yes if Online Channel |
|
BODY | shipping_information.address_1 | Yes if Online Channel |
|
BODY | shipping_information.address_2 | Yes if Online Channel |
|
BODY | shipping_information.city | Yes if Online Channel |
|
BODY | shipping_information.province | Yes if Online Channel |
|
BODY | shipping_information.postal_code | Yes if Online Channel |
|
BODY | widget_session_id | Yes if Online Channel |
|
BODY | request_id | Yes for in-store channel |
|
BODY | external_location_id | Yes for In-store channel |
|
BODY | external_employee_id | Yes for In-store channel |
|
Example Request - Auto Capture with SKU items:
{
"vcc_number": "1234567890123456",
"account_number": 1234567,
"reference": "orderid-12345",
"widget_session_id": "12345678901234567890", //if Online channel
"request_id": "12345678901234567890", //if in-store channel
"external_location_id" : "00-12345", //if in-store channel
"external_employee_id" :"12345-SMITH" //if in-store channel
"financing_option": {
"transaction_type": "promotional_purchase",
"plan_id": 5,
"term": 6
},
"amount": 5000.12,
"auto_capture": true,
"verification_code": 9999,
"billing_information": {
"first_name": "John",
"last_name": "Smith",
"address_1": "1234 Main Street",
"address_2": "",
"city": "Toronto",
"postal_code": "M1M1M1",
"country": "CA",
"province": "ON"
},
"shipping_information": {
"first_name": "John",
"last_name": "Smith",
"address_1": "1234 Main Street",
"address_2": "",
"city": "Toronto",
"postal_code": "M1M1M1",
"country": "CA",
"province": "ON"
},
"sku_data":{
{
"purchase_order": "100001234",
"register_id": "1A45",
"transaction_discount_total": -125.08,
"transaction_subtotal": 821.17,
"transaction_total": 1026.47,
"gst_hst": 133.45,
"pst": 71.85,
"products":[
{
"sku_id": "100xx4567",
"category": "electronics",
"description": "Apple Macbook 16-inch",
"quantity": 1,
"unit_price": 1000,
"extended_price": 984.35
},
{
"sku_id": "20bb3457",
"category": "office supplies",
"description": "24lb Multiuse Paper, White",
"quantity": 1,
"unit_price": 33.99,
"extended_price": 42.12
}
]
}