POST /batches/{id}/submit

This operation will submit a Batch that has been created and execute on the Payments within the Batch.

The Batch must be in DRAFT before submitting for processing. Once submitted, Payments to existing members will be processed immediately. Non-member Payments will be notified via SMS that a Payment is pending for them. The SMS will include your registered organisation name as well as the amount of the Payment.

The successfully submitted Batch will return either one of the following statusCode's:

  • OPEN: one or more Payments are pending payment to non-members

  • CLOSED: all Payments were successfully processed to members

If a batch is OPEN, it will be CLOSED as soon as:

  1. All Payments were successfully processed to 6DOT50 members;

  2. Some Payments to non-members were not claimed and Payments were reversed back to your PAY account (typically after 60 days).

You must have sufficient funds in your Account in order to process all the payments in the batch. If there are insufficient funds, the Batch will not submit. The account will need to be topped up first, then the Batch can be resubmitted.

After submitting a Batch, the payments in the Batch cannot be changed and the Batch cannot be cancelled.

You can change the reversal period for unclaimed Payments in the 6DOT50 PAY Portal.

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 submit for payment processing

Response

If the Batch submission was successful, the operation will return the Batch Details with new statusCode, a Summary of the Payments executed within the Batch, as well as an array of Payments (with their respective statusCode's):

{
  "id": "string($guid)",
  "name": "string",
  "statusCode": "string",
  "externalId": "string",
  "createdAt": "string($date-time)",
  "summary": {
    "paymentsAmount": decimal,
    "paymentsCount": 0,
    "referralsAmount": decimal,
    "settledAmount": decimal,
    "settledCount": 0,
    "cancelledAmount": decimal,
    "cancelledCount": 0
  },
  "payments": [
    {
      "id": "string($guid)",
      "batchId": "string($guid)",
      "msisdn": "string",
      "amount": decimal,
      "firstname": "string",
      "lastname": "string",
      "externalId": "string",
      "statusCode": "string",
      "settledAt": "string($date-time)",
      "isMember": boolean,
      "referralAmount": decimal,
      "referralMsisdn": "string",
      "createdAt": "string($date-time)"
    }
  ]
}
Field
Response Type
Description

id

string($guid)

Unique ID for the Batch.

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 successfully submitted Batch will have either an OPEN (some Payments still pending) or a CLOSED (all Payments completed) status.

createdAt

string($date-time)

Date and time when the Batch was created.

summary

BatchSummary

Standard Batch Summary response model

payments

Array of Payment

An array of Payments for the Batch

BatchSummary

Field
Response Type
Description

paymentsAmount

decimal

Total value of payments made

paymentsCount

int32

Total count of payments made

referralsAmount

decimal

Total value of referral payments made

settledAmount

decimal

Total value of payments that have been settled to users (i.e. paid to their accounts). The balance (paymentsAmount less settledAmount) is the value of payments pending to non-6DOT50 members (i.e. still to join)

settledCount

int32

Total count of payments settled

cancelledAmount

decimal

Total amount of payments cancelled in the batch (e.g. by using cancel operation)

cancelledCount

int32

Total count of payments cancelled

Payment

Field
Response Type
Description

id

string($guid)

Unique ID of the Payment.

batchId

string($guid)

The Batch ID that the Payment is part of.

msisdn

string

The mobile number paid, formatted in international dialing format. e.g. 27821231234.

amount

decimal

The amount paid for the Payment.

firstname

string

Firstname of the user.

lastname

string

Lastname of the user.

externalId

string

Payment identifier supplied by external system for tracing purposes.

statusCode

string

settledAt

string($date-time)

The date at which the Payment was paid into the user's account.

isMember

boolean

true = the user is a member of 6DOT50, false = the user is not a member of 6DOT50.

referralAmount

decimal

The Amount to allocate as a referral. Only applicable if Referral capability has been enabled for the Organisation.

referralMsisdn

string

The MSISDN of the referral. Only applicable if Referral capability has been enabled for the Organisation.

createdAt

string($date-time)

The date and time when the Payment was created.

Sample Response
{
  "id": "b7ccbefd-51e1-4720-81fb-da5740e38e8c",
  "name": "Test Batch 1",
  "statusCode": "OPEN",
  "externalId": "testbatch1",
  "createdAt": "2022-12-13T12:29:39.633",
  "summary": {
    "paymentsAmount": 23,
    "paymentsCount": 3,
    "referralsAmount": 0,
    "settledAmount": 0,
    "settledCount": 0,
    "cancelledAmount": 0,
    "cancelledCount": 0
  },
  "payments": [
    {
      "id": "cb6c2984-7b80-4964-aed7-6a12b72a7895",
      "msisdn": "27821231234",
      "amount": 10,
      "firstname": "Test",
      "lastname": "User 1",
      "statusCode": "PENDING",
      "isMember": false,
      "createdAt": "2022-12-14T09:21:53.95"
    },
    {
      "id": "4e47e31e-33e5-476e-bb9e-98bde753c207",
      "msisdn": "27821231235",
      "amount": 5,
      "firstname": "Test",
      "lastname": "User 2",
      "statusCode": "PENDING",
      "isMember": false,
      "createdAt": "2022-12-14T09:21:53.967"
    },
    {
      "id": "df5039d8-6d3e-4c64-a4e3-f5bdf12d8f1b",
      "msisdn": "27821231236",
      "amount": 8,
      "firstname": "Test",
      "lastname": "User 3",
      "statusCode": "PENDING",
      "isMember": false,
      "createdAt": "2022-12-14T09:21:53.973"
    }
  ]
}

Note how each of the above Payments are PENDING. This means they are not yet 6DOT50 members. In this scenario, each user has been SMS'd that the amount is due for payment to them. SMS's will not be sent to users in the Test environment.

Last updated