Cancel Payment
Cancel a payment by payment ID.
After a payment is created, it can be cancelled using the following API. The request body is optional. Omit it to close the payment as the account that owns the token. Partners closing a customer payment must send onBehalfAccountId in the body.
A payment can always be cancelled when its status is Drafted. Payments in Sent or PendingAuth are also cancellable unless either the payer or payee funding method is external (third-party). An Authorized payment can be cancelled only if it is not third-party funded and its related debit/credit transaction has not progressed into a non-cancellable state or into a batch that has already started processing.
POST /veem/v1.2/payments/{paymentId}/cancel
HeadersThree headers are required to use this endpoint.
Name Type Required Description Authorizationstring Yes Bearer token (OAuth 2.0) This header holds the bearer token required to use Veem's public API, and belongs to the owner account. Failure to use a valid bearer token will result in a 404 (Not Found) status code in the response. An example of a valid header value is as follows: Bearer c047594b-082c-4da1-be89-08fe3770f4b3.
See Get Access Token section to generate your Bearer token.X-Request-Idstring Yes This is a unique string that identifies the current API request, and should follow the UUID format. Reusing this header without changing the value will result in a 409 (Conflict) status code in the response. An example X-request-id is as follows: 48855846-628d-4177-b071-80332a116f0aContent-Typestring Yes The content type of the request. Must be application/json
Request body (optional)
{
"onBehalfAccountId": 12345 // see Partner Notes
}Partner Notes:
- A partner account can be configured to make this API request on behalf of their customers. This requires internal configuration for the partner account by Veem. Once the internal configuration is enabled, the API request can be made using partner account bearer token.
onBehalfAccountIdis an optional parameter, this needs to be included on the request body in case of partner making an API request on behalf of their customer. This is the customer Veem account ID.
Updated about 4 hours ago
