Payments
Add Payment
post /paymentsUsed for initializing a new payment in the external system.
{ "creditpaymentid": null, "paymentname": "Custom Payment", "amount": "398.00", "currencycode": "SEK", "storeid": "1", "storename": "Sitoo Concept Store", "storeexternalid": "SCS101", "posid": "SIE0000160000051", "receiptid": "SIE000016000005112345", "customer": { "mobile": "+46701234567" }, "cartitems": [ { "itemid": "0", "sku": "9783836508766", "productname": "Les Diners De Gala", "productname2": "", "note": "", "vatvalue": 6, "total": "118.00", "vat": "6.68", "manual_discount": "19.00", "manual_discountvat": "1.08", "manual_discountname": "Special Offer!", "quantity": 2, "unitsize": null, "unitlabel": "", "discounts": [] }, { "itemid": "1", "sku": "8840-31-m", "productname": "Cubic Shirt", "productname2": "M", "note": "", "vatvalue": 25, "total": "599.00", "vat": "119.80", "manual_discount": "0.00", "manual_discountvat": "0.00", "manual_discountname": null, "quantity": 1, "unitsize": null, "unitlabel": "", "discounts": [ { "name": "VIP", "total": "300.00", "vat": "60.00", "discountid": "24", "discountcode": "Member" } ] } ]}
"123456789"
HTTP Status Code Summary | |
---|---|
200 | Returns paymentid |
400 | Bad Request. Invalid syntax, missing required argument or invalid request. |
401 | Unauthorized. Authorization failed. |
404 | Resource not found. The url is invalid. |
500 | Internal Server Error. |
Get Payment
get /payments/{paymentid}Used for getting a payment from the external system.
{ "paymentid": "123456789", "creditpaymentid": null, "paymentname": "Custom Payment", "paymentstate": { "state": "ready_to_complete", "receiptrow": "123456789", "receiptsection": [ "Custom Payment", "Ref\t123456789", "Amount\t398.00" ] }, "amount": "398.00", "currencycode": "SEK", "storeid": "1", "storename": "Sitoo Concept Store", "storeexternalid": "SCS101", "posid": "SIE0000160000051", "receiptid": "SIE000016000005112345", "customer": { "mobile": "+46701234567" }, "cartitems": [ { "itemid": "0", "sku": "9783836508766", "productname": "Les Diners De Gala", "productname2": "", "note": "", "vatvalue": 6, "total": "118.00", "vat": "6.68", "manual_discount": "19.00", "manual_discountvat": "1.08", "manual_discountname": "Special Offer!", "quantity": 2, "unitsize": null, "unitlabel": "", "discounts": [] }, { "itemid": "1", "sku": "8840-31-m", "productname": "Cubic Shirt", "productname2": "M", "note": "", "vatvalue": 25, "total": "599.00", "vat": "119.80", "manual_discount": "0.00", "manual_discountvat": "0.00", "manual_discountname": null, "quantity": 1, "unitsize": null, "unitlabel": "", "discounts": [ { "name": "VIP", "total": "300.00", "vat": "60.00", "discountid": "24", "discountcode": "Member" } ] } ]}
HTTP Status Code Summary | |
---|---|
200 | Returns an item of type CpaPayment |
400 | Bad Request. Invalid syntax, missing required argument or invalid request. |
401 | Unauthorized. Authorization failed. |
404 | Resource not found. The url is invalid. |
500 | Internal Server Error. |
Update Payment
put /payments/{paymentid}Used for updating the paymentstate of a payment in the external system.
{ "paymentstate": { "state": "completed" }}
HTTP Status Code Summary | |
---|---|
200 | |
400 | Bad Request. Invalid syntax, missing required argument or invalid request. |
401 | Unauthorized. Authorization failed. |
404 | Resource not found. The url is invalid. |
500 | Internal Server Error. |
Objects
cpacartitemobject
ID of item.
Stock Keeping Unit (SKU) for item.
Title row 1 for item.
Optional. Title row 2 for item.
Optional. Note for transaction item.
VAT percentage for item.
Total amount for item incl VAT (before applying manual discount and discounts)
VAT amount for total.
Manual discount incl VAT
VAT amount for manual discount
Optional. Name provided for manual discount
Quantity for item.
Optional. Unit Size (How much that is included in each unit).
Optional. Label for unit of item. (e.g. kg)
Discounts for this cart item. Array of CpaCartItemDiscount.
cpacartitemdiscountobject
cpacustomerobject
Mobile number for customer for the payment (E.164 format).
cpapaymentobject
Optional. Unique ID for payment created by server.
Optional. Name of payment.
Optional. ID for a previous payment that is being credited.
Optional. Enumerated value for state of payment.
Total amount for payment.
Currency Code for payment (3-letter ISO 4217).
Store ID for the transaction.
Store Name for the transaction.
Optional. Store External ID for the transaction (NOTE! Sitoo POS uses the externalid
property of the connected warehouse for this).
POS ID for the transaction.
Optional. Receipt ID of the transaction.
Optional. Customer for the payment. CpaCustomer
Optional. Items in cart that the payment is for. Array of CpaCartItem.
decimalquantitystring
moneystring
paymentstate_cancelledobject
Payment state.
VALUES |
---|
cancelled |
paymentstate_completedobject
Payment state.
VALUES |
---|
completed |
paymentstate_inprogressobject
Payment state.
VALUES |
---|
inprogress |
QR data to be displayed in the POS during the payment process.
Image data (base64-encoded) to be displayed in the POS during the payment process.
Text to be displayed in the POS during the payment process.
paymentstate_ready_to_completeobject
Payment state.
VALUES |
---|
ready_to_complete |
Text to be printed on the receipt next to the payment.
Text to be printed on the receipt in a separate section.