Bavindo
  1. Payment
Bavindo
API
  • API
  • Webhook
  • v1
    • Terminal
      • POS Connected Terminals
    • Payment
      • POS Payment Create
        POST
      • POS Payment Cancel
        POST
      • Get Payment Details
        GET
      • POS Payment Refund Referenced
        POST
    • NFC
      • NFC Transaction Start/Continue
      • NFC Transaction Stop
  1. Payment

POS Payment Cancel

Developing
POST
https://api.bavindo.com/v1/payment/pos/cancel
INFO
This endpoint can be accessed with the following API type: pos-payment.
TIP
Don't have an API key? Create one in your Customer Area with the type pos-payment, go to Developers -> Api Credentials.
INFO
When cancelling a payment, the API key needs to have the same store ID a the payment itself.

Cancelling a in process POS payment#

Sometimes your shoppers change their mind in mid-purchase, or store staff realize they've made a mistake while the shopper is using the terminal.
A cancel request lets either a shopper or store staff abort an in-progress payment. When the cancel request is received before a payment is Approved, the payment is cancelled.
Here we explain how you can cancel payments from your POS terminal using the sample request below.
To double-check the payment was indeed cancelled, make a request to Get Payment Details. The status of the payment should be failure, in the adyen_response you can optionally look for the errorCondition of the payment.
Adyen docs behind this request

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/json
payment_id
string <uuid>
required
The ID of the payment which will be cancelled
Example:
c568741f-783d-4b40-9a6f-d33af99d
Example
{
    "payment_id": "c568741f-783d-4b40-9a6f-d33af99d"
}

Responses

🟢200Success
application/json
Body
event_type
string 
required
The sent Adyen event message type
Example:
service.abort.request
event
string 
required
If the cancellation was successful
Examples:
successfailure
event_condition
string  | null 
required
The condition of the event
Examples:
abortednotfoundnull
payment_id
string 
required
The ID of your Payment of the cancellation
store_id
string 
required
The Store ID associated with the API Key and payment
terminal_id
string 
required
The ID of the pysical Adyen terminal where the payment took place
pos_id
string 
required
The ID of your POS terminal where the payment took place
metadata
object  | null 
required
The metadata you provided
your_info
string 
required
environment
string 
required
The environment the API key is working on
Examples:
testlive
Example
{
    "event_type": "service.abort.request",
    "event": "success",
    "event_condition": "aborted",
    "payment_id": "c568741f-783d-4b40-9a6f-d33af99d",
    "store_id": "3294V22322755KZ6TWHGPRJ",
    "terminal_id": "P400Plus-00000000",
    "pos_id": "willekeurig",
    "metadata": {
        "your_info": "123456789"
    },
    "environment": "test"
}
Modified at 2024-10-21 12:26:42
Previous
POS Payment Create
Next
Get Payment Details
Built with