Sending payments to us
How to
POST JSON to https://sticky.to/v2/connectionhook/---/CONNECTION_TEVALIS/private--payment
with an Authorization
header as Bearer [YOUR_PRIVATE_KEY]
. Don’t prepend the key with private:
.
{
"sessionId": "1667e296-cb62-4f6e-8aa7-e898d62c3d11",
"total": 100
}
sessionId
: UUID.
total
: Integer ($1.00 USD = 100
).
discount
: Integer (not a %; $0.20 = 20
); optional.
paymentGatewayId
: String (external reference); optional.
cart
: Array of objects validated strictly; optional:
[
{
"productId": "UUID (must be a UUID that exists); optional",
"productName": "String; required",
"productPrice": "Integer; required",
"productTheirId": "String (ID of a product on your remote system e.g. a PLU); optional",
"quantity": "Integer; required"
}
]
Full example
curl --request POST \
--url https://sticky.to/v2/connectionhook/---/CONNECTION_TEVALIS/private--payment \
--header 'Authorization: Bearer [YOUR_PRIVATE_KEY]' \
--header 'Content-Type: application/json' \
--data '{
"sessionId": "1667e296-cb62-4f6e-8aa7-e898d62c3d11",
"total": 50,
"cart": [
{
"productName": "Product name",
"quantity": 2,
"productId": "f5fa03ee-ed1b-4454-a079-0a1dfa2477a0",
"productTheirId": "REMOTE-SYSTEM-PLU-123",
"productPrice": 25
}
]
}'
Questions and answers
Is the discount a total of discount on the bill (regardless of entry point, i.e. in dashboard or manually applied on the POS), or should it just be the in dashboard discount?
discount
should be a total of discount on the bill, regardless of entry point.
Should the total
be before or after a discount (scenario: bill was 120 discounted by 20 to 100)?
discount
should be 20
and total
should be 100. total
is the actual amount the consumer pays.
Is each cart
item before or after a discount?
We don’t have support for discounts per cart
item. The best approach is setting productPrice
as a value before any discounts, e.g. 120 in the previous question.
Is cart
item productPrice
the price of the line, or the price of the product (scenario: there are 2 of the same product each costing 50)?
It’s the price of the product. Send productPrice
as 50 with a quantity of 2.