Payment Agreement
Cancel payment agreement
Cancel an existing payment agreement by id.
Error Codes
| Code | Status | Reason | What to do |
|---|---|---|---|
| PAM_INVALID_OPERATION | 400 | Current agreement state cannot be cancelled | Ensure agreement is in cancellable state. |
| PAM_SB_PAG_NOT_FOUND_ERROR | 404 | Payment agreement not found | Check id and ensure it belongs to this merchant. |
| MOV_RECALL_FAILED | 404 | Unable to recall agreement | Unable to recall agreement, please check status |
| PAM_FORBIDDEN_ERROR | 403 | Merchant is not allowed to cancel this agreement | Verify merchant ownership/permissions. |
delete
/api/public/payment_agreement/cancelCancel payment agreement
Cancel an existing payment agreement by id.
Error Codes
| Code | Status | Reason | What to do |
|---|---|---|---|
| PAM_INVALID_OPERATION | 400 | Current agreement state cannot be cancelled | Ensure agreement is in cancellable state. |
| PAM_SB_PAG_NOT_FOUND_ERROR | 404 | Payment agreement not found | Check id and ensure it belongs to this merchant. |
| MOV_RECALL_FAILED | 404 | Unable to recall agreement | Unable to recall agreement, please check status |
| PAM_FORBIDDEN_ERROR | 403 | Merchant is not allowed to cancel this agreement | Verify merchant ownership/permissions. |
Servers
Staging: https://dev-api.shabaas.com
Production: https://api.shabaas.com
Authentication
BearerAuth
Authorization: Bearer <token>Bearer token returned by /api/public/authorization.
Parameters
idqueryRequiredstring
Responses
200Payment agreement cancelled successfully.
application/jsonobject
Properties
messageOptionalstringstring
Example
"Success"dataOptionalobjectobject
Additional properties are supported; see the endpoint definition for their schema.
Agreement cancelled
{
"message": "Payment Agreement cancelled successfully",
"data": {}
}404Agreement id not found for this merchant.
application/jsonobject
Properties
messageRequiredstringstring
Example
"Payee account cannot receive NPP Payments"error_codeRequiredstringstring
Example
"MOV_NPP_PAYMENT_NOT_SUPPORTED"dataRequiredobjectobject
Example
{
"response_time": "2026-04-08T12:28:26.759Z"
}Additional properties are supported; see the endpoint definition for their schema.
Agreement id not found
{
"message": "MONOOVA-monoova.PAM_SB_PAG_NOT_FOUND_ERROR",
"error_code": "GN-0000",
"data": {
"response_time": "2026-04-28T12:00:00.000Z"
}
}Full endpoint OpenAPI definition
{
"openapi": "3.0.3",
"info": {
"title": "ShaBaasPay Public API",
"version": "1.0.0",
"description": "Describes public REST endpoints for authorization, payment agreements, payment initiations,\nrefunds, webhooks, and PayID collection APIs.\n"
},
"servers": [
{
"url": "https://dev-api.shabaas.com",
"description": "Staging"
},
{
"url": "https://api.shabaas.com",
"description": "Production"
}
],
"tags": [
{
"name": "Payment Agreement",
"x-displayName": "Payment Agreement",
"description": "Create, retrieve, amend, resend, and cancel PayTo payment agreements."
}
],
"x-tagGroups": [
{
"name": "SHABAASPAY PUBLIC API",
"tags": [
"API Keys",
"Payment Agreement",
"Payment Initiation",
"Checkout",
"B2B Collections",
"Webhooks"
]
},
{
"name": "Internal",
"tags": [
"Clients"
]
}
],
"security": [
{
"BearerAuth": []
}
],
"paths": {
"/api/public/payment_agreement/cancel": {
"delete": {
"tags": [
"Payment Agreement"
],
"summary": "Cancel payment agreement",
"description": "Cancel an existing payment agreement by id.\n\n### Error Codes\n| Code | Status | Reason | What to do |\n| ---- | ------ | ------ | ---------- |\n| PAM_INVALID_OPERATION | 400 | Current agreement state cannot be cancelled | Ensure agreement is in cancellable state. |\n| PAM_SB_PAG_NOT_FOUND_ERROR | 404 | Payment agreement not found | Check `id` and ensure it belongs to this merchant. |\n| MOV_RECALL_FAILED | 404 | Unable to recall agreement | Unable to recall agreement, please check status |\n| PAM_FORBIDDEN_ERROR | 403 | Merchant is not allowed to cancel this agreement | Verify merchant ownership/permissions. |\n",
"parameters": [
{
"in": "query",
"name": "id",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Payment agreement cancelled successfully.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageResponse"
},
"examples": {
"cancelled": {
"summary": "Agreement cancelled",
"value": {
"message": "Payment Agreement cancelled successfully",
"data": {}
}
}
}
}
}
},
"404": {
"description": "Agreement id not found for this merchant.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"not_found": {
"summary": "Agreement id not found",
"value": {
"message": "MONOOVA-monoova.PAM_SB_PAG_NOT_FOUND_ERROR",
"error_code": "GN-0000",
"data": {
"response_time": "2026-04-28T12:00:00.000Z"
}
}
}
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"MessageResponse": {
"type": "object",
"properties": {
"message": {
"type": "string",
"example": "Success"
},
"data": {
"type": "object",
"additionalProperties": true
}
}
},
"ErrorResponse": {
"type": "object",
"required": [
"message",
"error_code",
"data"
],
"properties": {
"message": {
"type": "string",
"example": "Payee account cannot receive NPP Payments"
},
"error_code": {
"type": "string",
"example": "MOV_NPP_PAYMENT_NOT_SUPPORTED"
},
"data": {
"type": "object",
"additionalProperties": true,
"example": {
"response_time": "2026-04-08T12:28:26.759Z"
}
}
}
}
},
"securitySchemes": {
"BearerAuth": {
"type": "http",
"scheme": "bearer",
"bearerFormat": "JWT",
"description": "Bearer token returned by `/api/public/authorization`."
}
}
}
}