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. Payments

DELETE /payments/{id}

This operation allows for the deletion of a single payment which is in DRAFT status.

When you delete a Payment, it will be permanently deleted from the batch it is associated to. Using a GET /payments/{id} (after deleting the Payment) will return as a 404 Not Found.

Request

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

Header
Mandatory
Description

Authorization

Yes

Parameter
Mandatory
Description

id

Yes

The unique payment ID to delete.

Response

A 404 Not Found HTTP response will be returned if the paymentId does not exist.

If the Payment exists, and the Payment could be deleted: an HTTP 200 response will be returned with the following body:

{
  "id": "",
  "batchId": "",
  "msisdn": "27797411850",
  "amount": 250,
  "firstname": "string",
  "lastname": "string",
  "statusCode": "DELETED",
  "isMember": boolean,
  "createdAt": ""
}

If the Payment is not in DRAFT status, then a 400 Bad Request will be returned.

Sample Response
{
  "id": "d07295e6-98ef-46b1-9911-01b8a3426de6",
  "batchId": "7c2c1a0a-f462-42c3-b13c-30da2e4ad216",
  "msisdn": "27821231234",
  "amount": 250,
  "firstname": "Test",
  "lastname": "User 1",
  "statusCode": "DELETED",
  "isMember": true,
  "createdAt": "2022-11-16T14:08:52.127"
}
PreviousGET /payments/{id}NextGET /payments/statusCodes

Last updated 2 years ago

Bearer token from

/authentication/getToken