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

PreviousBatchesNextGET /batches

Last updated 2 years ago

This operation creates a new payment Batch in DRAFT status.

When creating a new Batch:

  1. A unique ID will be returned which can be used for subsequent calls to query and/or modify the Batch.

  2. A Batch is created with no Payments. Payments for the batch are added by calling .

  3. A new batch will be created in a draft status (i.e. statusCode: DRAFT). Batches in draft status are not processed until is called.

  4. externalId (in the request body) can be supplied to map payment identifiers in an external system. If externalId is supplied, then it must be unique.

When a batch is in DRAFT status, it can be updated (e.g. name and payment details can be updated) as well as cancelled.

Request

Creating a new Batch requires the following payload:

{
  "name": "string",
  "externalId": "string"
}
Header
Mandatory
Description

Authorization

Yes

Body Field
Mandatory
Description

name

Yes

Friendly name to give to the Batch.

externalId

No

Optional batch identifier that can be supplied by external system for tracing purposes. If supplied, the externalID across all batches must be unique.

Sample Request
{
  "name": "Test Batch 1",
  "externalId": "testbatch1"
}

Response

If successful, the operation will return a Batch response:

{
  "id": "string($guid)",
  "name": "string",
  "externalId": "string",
  "statusCode": "string",
  "createdAt": "string($date-time)"
}
Field
Response Type
Description

id

string($guid)

Unique ID for the Batch. Used for subsequent calls to other Batch operations.

name

string

Name of the batch as supplied in the request.

externalId

string

External ID of the batch as supplied in the request.

statusCode

string

Status of the Batch. A new Batch will always have a DRAFT status code.

createdAt

string($date-time)

Date and time when the Batch was created.

Sample Response
{
  "id": "b7ccbefd-51e1-4720-81fb-da5700e34e81",
  "name": "Test Batch 1",
  "externalId": "testbatch1",
  "statusCode": "DRAFT",
  "createdAt": "2022-12-13T12:29:39.6332995Z"
}

Bearer token from

POST /batches/{id}/payments
POST /batch/{id}/submit
/authentication/getToken