6DOT50 APIs
  • Redemptions API
    • Overview
    • Process Flow
    • Requests
    • Response Models
    • Payment Codes
    • Authentication
      • POST /authentication/getToken
  • Accounts
    • GET /accounts
    • GET /accounts/{id}/transactions
  • Initiate Payment
    • POST /payments
  • User Payment Pages
    • Authentication
    • Payment Confirmation
    • Payment Status
  • Payment Status
    • GET /payments/{id}
  • List Payments
    • GET /payments
  • Support
  • PAY API
    • Overview
    • API Keys
    • Endpoints
    • Process Flow
    • Requests
    • Response Models
    • Authentication
      • POST /authentication/getToken
    • Accounts
      • GET /accounts
    • Batches
      • POST /batches
      • GET /batches
      • GET /batches/{id}
      • PUT /batches/{id}
      • GET /batches/statusCodes
      • POST /batches/{id}/payments
      • GET /batches/{id}/payments
      • POST /batches/{id}/submit
      • POST /batches/{id}/cancel
    • Members
      • GET /members/{msisdn}/exists
    • Payments
      • GET /payments/{id}
      • DELETE /payments/{id}
      • GET /payments/statusCodes
  • Support
Powered by GitBook
On this page
  • Request
  • Response
  1. PAY API
  2. Batches

POST /batches/{id}/cancel

This operation allows you to cancel a Batch which is in DRAFT status.

All Payments associated to the Batch will also be cancelled.

Request

Ensure the bearer token is included in the Header of the POST operation:

Header
Mandatory
Description

Authorization

Yes

Parameter
Mandatory
Description

id

Yes

The Batch ID to cancel

Response

If the Batch was in DRAFT status, and the Batch could be successfully cancelled, the Batch details will return, including a Batch Summary:

{
  "id": "string($guid)",
  "name": "string",
  "statusCode": "string",
  "externalId": "string",
  "createdAt": "string($date-time)",
  "summary": {
    "paymentsAmount": decimal,
    "paymentsCount": int32,
    "referralsAmount": decimal,
    "settledAmount": decimal,
    "settledCount": int32,
    "cancelledAmount": decimal,
    "cancelledCount": int32
  }
}

The statusCode for the Batch will return as CANCELLED. In addition, cancelledAmount and cancelledCount for the Batch Summary will be populated.

Sample Response
{
  "id": "f945d71c-b00f-4e77-8175-253093157a2f",
  "name": "Test",
  "statusCode": "CANCELLED",
  "createdAt": "2022-06-14T06:26:43.473",
  "summary": {
    "paymentsAmount": 18500,
    "paymentsCount": 185,
    "referralsAmount": 0,
    "settledAmount": 0,
    "settledCount": 0,
    "cancelledAmount": 18500,
    "cancelledCount": 185
  }
}
PreviousPOST /batches/{id}/submitNextMembers

Last updated 2 years ago

Bearer token from

Refer to for details on the field values.

You can use to get further details on the individual Payments that were cancelled.

GET /batches/{id}
GET /batches/{id}/payments
/authentication/getToken