Skip to content

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:

python
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:

json
{
  "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:

python
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:

json
[
  {
    "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:

python
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:

CodeDescription
pendingOrderOrder pending.
orderCancelledOrder canceled.
orderInProgressOrder in progress.
shippedOrder shipped.
delivredOrder delivered..
activatedPayment terminal activated.
posLostByCarrierPayment terminal lost by the carrier.
pendingPosReturnThe user must return the payment terminal. Awaiting return of the payment terminal.
poskeptByMerchantPayment terminal retained by the user following termination.
posReturnedPayment terminal returned to Stancer.
deactivatedPayment terminal deactivated.