Payment Terminal
Order a Payment Terminal
Prerequisites
Your company must have a status of validated or available in order to order a payment terminal.
You must also have provided the shipping address via the shipping-address field during a POST|PATCH /company request.
Order a payment terminal
Use the POST /payment-terminal?company=<comp>&account=<acct>&name=<name> endpoint to order a payment terminal:
import requests
url = "https://api-partners.stancer.com/api/partners/payment-terminal?company=comp_1b5u13neReekPsT9Tp8onW7n&account=acct_ncjpK8mjnaCtrE3qLsHIaI9d&name=tpe1"
payload = {}
headers = {}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.json())Response:
{
"id": "term_vSV6TfDW6p1FMPPpxhBxEuhA",
"name": "tpe1",
"status": "pendingOrder"
}Retrieve the list of payment terminals
Use the endpoint GET /payment-terminal?company=<comp>&account=<acct> to retrieve the list of payment terminals:
import requests
url = "https://api-partners.stancer.com/api/partners/payment-terminal?company=comp_1b5u13neReekPsT9Tp8onW7n&account=acct_ncjpK8mjnaCtrE3qLsHIaI9d&name=tpe1"
payload = {}
headers = {}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.json())Response:
[
{
"carrier-name": "DHL",
"id": "term_vSV6TfDW6p1FMPPpxhBxEuhA",
"name": "tpe1",
"status": "shipped",
"tracking-url": "https://www.dhl.com/fr/home/tracking.html?tracking-id=4456653377&submit=1"
}
]Once the order has been shipped, you will have access to the carrier name (carrier-name) and a tracking URL (tracking-url).
Canceling a Payment Terminal Order
You can cancel the order only if its status is pendingOrder.
Use the endpoint POST /cancel-payment-terminal-order?company=<comp>&account=<acct>&payment-terminal=<term> to cancel a payment terminal order:
import requests
url = "https://api-partners.stancer.com/api/partners/cancel-payment-terminal-order?company=comp_1b5u13neReekPsT9Tp8onW7n&account=acct_ncjpK8mjnaCtrE3qLsHIaI9d&payment-terminal=term_rEQA6RgblYJ8WlnCrHEtxuM0"
payload = {}
headers = {}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.json())Statuses
Here is a list of the statuses of a payment terminal:
| Code | Description |
|---|---|
| pendingOrder | Order pending. |
| orderCancelled | Order canceled. |
| orderInProgress | Order in progress. |
| shipped | Order shipped. |
| delivred | Order delivered.. |
| activated | Payment terminal activated. |
| posLostByCarrier | Payment terminal lost by the carrier. |
| pendingPosReturn | The user must return the payment terminal. Awaiting return of the payment terminal. |
| poskeptByMerchant | Payment terminal retained by the user following termination. |
| posReturned | Payment terminal returned to Stancer. |
| deactivated | Payment terminal deactivated. |