Payment batch events

We currently send multiple types of payment batch events. This section will help you understand the purpose of each event.

Overview

Payment batch events identify what stage the batch is in. They have an underscore separating the words (e.g., batch_created).

For more info on what a payment batch is, check the Batch payments management page.



Event envelope

Each event request body follows a standardized envelope format for all events. This format ensures that all events follow a standardized structure, making it easier to process and understand them.


FieldDescriptionExample
idThe identifier of the object the event is related to (e.g., batch id, payment id etc.)45b93ecf-c718-4255-8485-10228f ca6713
sourceThe source of the eventhttps://example.com
specVersionThe version of the CloudEvent spec1.0
typeThe type of eventbatch_created
dataContentTypeContent type of the dataapplication/json
dataThe payload of the eventdynamic JSON object
timeThe date and time the event was created2024-12-02T15:24:40. 6048459Z
causationIdThe identifier of the event134433a2-387d-48b8-9d7e-ddc7af8c705f

{
    "id": "45b93ecf-c718-4255-8485-10228f ca6713",
    "source": "https://example.com",
    "specVersion": "1.0",
    "type": "batch_created",
    "dataContentType": "application/json",
    "data": {
        "org": "ABC",
        "account": "ABC",
        "subAccount": "ABC001",
        "totalAmount": 100,
        "numberOfPayments": 1,
        "status": "Created",
        "fundingMethod": "PreFundedSameDay",
        "type": "batch_created"
    },
    "time": "2024-12-02T15:24:40. 6048459Z",
    "causationId": "134433a2-387d-48b8-9d7e-ddc7af8c705f"
}
📘

Note

Please note that the Data field contains a dynamic JSON object, which can vary depending on the specific event being published



Events list

The following table lists the payment batch funding events sent by Payment Issuing and a short description of each:

Event NameDescription
batch_createdPayment batch has been created
batch_heldBatch has been moved to held status. Requires account to have hold/release configured to “Yes”. Otherwise, the batch is automatically released and moves to batch_initiated.
batch_releasedBatch has been released and will move to batch_initiated
batch_initiatedBatch has been initiated
batch_funding_requestedSent when the Funding Request API returns success for a given batch’s funding request
batch_canceledBatch has been cancelled. This is a terminal status for the batch and any payments in the batch.
batch_funding_completedBatch has successfully completed funding, and the money is in a Optum-controlled bank account
batch_funding_failedBatch has failed funding
batch_loading_requestedPayments in this batch have started loading into payment networks
batch_loadedAll payments in the batch have loaded into at least 1 payment network (e.g., all payments in the batch have at least 1 loading.completed event
batch_distributedAll payments in the batch have been distributed into at least 1 distribution network (e.g., all payments in the batch have at least 1 distribution.completed event)
batch_completedBatch has completed loading and distributing. Published when both the batch_loaded and batch_distribution events have been published for a batch.
payment_removedA payment was removed from the batch


Payment Batch Events Payload

In this section we'll explore together each event and it's payload that will be provided in the body.

Batch Created

Payment batch has been created

batch\_created Body
{
  "id": "45b93ecf-c718-4255-8485-10228f ca6713",
  "source": "https://example.com",
  "specVersion": "1.0",
  "type": "batch_created",
  "dataContentType": "application/json",
  "data": {
      "org": "ABC",
      "account": "ABC",
      "subAccount": "ABC001",
      "totalAmount": 100,
      "numberOfPayments": 1,
      "status": "Created",
      "fundingMethod": "PreFundedSameDay",
      "type": "batch_created"
  },
  "time": "2024-12-02T15:24:40. 6048459Z",
  "causationId": "134433a2-387d-48b8-9d7e-ddc7af8c705f"
}
batch\_created Fields
FieldExampleDescription
orgABCThe short code for the organization
accountABCThe short code for the account
subAccountABC001The short code for the sub-account
totalAmount100The sum total amount of all payments in the batch
numberOfPayments4The amount of payments in the batch
statusCreatedThe status of the batch
fundingMethodPreFundedSameDayThe funding method associated with the account/subaccount for this batch
typebatch_createdThe event type

Batch Held

Batch has been moved to held status. Requires Account to have hold/release configured to “Yes”. Otherwise, the batch is automatically released and moves to batch_initiated.

batch\_held Body
{
  "id": "45b93ecf-c718-4255-8485-10228f ca6713",
  "source": "https://example.com",
  "specVersion": "1.0",
  "type": "batch_held",
  "dataContentType": "application/json",
  "data": {
      "status": "Held",
      "fundingMethod": "PreFundedSameDay",
      "amount": 1754.98,
      "numberOfPayments": 1,
      "org": "MCK",
      "account": "MCK",
      "subAccount": "MCK002",
      "type": "batch_held"
  },
  "time": "2024-12-02T15:24:40. 6048459Z",
  "causationId": "134433a2-387d-48b8-9d7e-ddc7af8c705f"
}
batch\_held Fielxs
FieldDescriptionExample
orgThe short code for the organizationABC
accountThe short code for the accountABC
subAccountThe short code for the sub-accountABC001
statusThe status of the batchHeld
fundingMethodThe funding method associated with the account/subaccount for this batchPreFundedSameDay
typeThe event typebatch_held

Batch Released

Batch has been released and will move to batch_initiated

batch\_released Body
{
   "id": "45b93ecf-c718-4255-8485-10228f ca6713",
   "source": "https://example.com",
   "specVersion": "1.0",
   "type": "batch_released",
   "dataContentType": "application/json",
   "data": {
       "requestedBy": "[email protected]",
       "status": "Released",
       "amount": 1754.98,
       "numberOfPayments": 1,
       "org": "MCK",
       "account": "MCK",
       "subAccount": "MCK002",
       "type": "batch_released"
   },
   "time": "2024-12-02T15:24:40. 6048459Z",
   "causationId": "134433a2-387d-48b8-9d7e-ddc7af8c705f"
}
batch\_released Fields
FieldDescriptionExample
orgThe short code for the organizationABC
accountThe short code for the accountABC
subAccountThe short code for the sub-accountABC001
statusThe status of the batchReleased
requestedByThe user account/email that requested the release[email protected]
typeThe event typebatch_released

Batch Initiated

Batch has been initiated

batch\_initiated Body
{
  "id": "45b93ecf-c718-4255-8485-10228f ca6713",
  "source": "https://example.com",
  "specVersion": "1.0",
  "type": "batch_initiated",
  "dataContentType": "application/json",
  "data": {
      "amount": 1754.98,
      "numberOfPayments": 1,
      "fundingMethod": "PreFundedSameDay",
      "status": "Initiated",
      "org": "MCK",
      "account": "MCK",
      "subAccount": "MCK001",
      "type": "batch_initiated"
  },
  "time": "2024-12-02T15:24:40. 6048459Z",
  "causationId": "134433a2-387d-48b8-9d7e-ddc7af8c705f"
}
batch\_initiated Fields
FieldDescriptionExample
orgThe short code for the organizationABC
accountThe short code for the accountABC
subAccountThe short code for the sub-accountABC001
statusThe status of the batchInitiated
typeThe event typebatch_initiated

Batch Funding Requested

Sent when the Funding Request API returns success for a given batch’s funding request

batch\_funding\_requested Body
{
  "id": "45b93ecf-c718-4255-8485-10228f ca6713",
  "source": "https://example.com",
  "specVersion": "1.0",
  "type": "batch_funding_requested",
  "dataContentType": "application/json",
  "data": {
      "status": "Funding",
      "fundingStatus": "Requested",
      "amount": 1754.98,
      "fundingMethod": "PreFundedSameDay",
      "fundingRequestId": "D24BD704KI",
      "org": "MCK",
      "account": "MCK",
      "subAccount": "MCK001",
      "type": "batch_funding_requested"
  },
  "time": "2024-12-02T15:24:40. 6048459Z",
  "causationId": "134433a2-387d-48b8-9d7e-ddc7af8c705f"
}
batch\_funding\_requested Fields
FieldDescriptionExample
orgThe short code for the organizationABC
accountThe short code for the accountABC
subAccountThe short code for the sub-accountABC001
statusThe status of the batchFunding
fundingStatusThe status of the funding requestRequested
typeThe event typebatch_funding_requested

Batch Cancelled

Batch has been cancelled. This is a terminal status for the batch and any payments in the batch.

batch\_cancelled Body
{
  "id": "45b93ecf-c718-4255-8485-10228f ca6713",
  "source": "https://example.com",
  "specVersion": "1.0",
  "type": "batch_canceled",
  "dataContentType": "application/json",
  "data": {
      "canceledBy": "[email protected]",
      "status": "Canceled",
      "amount": 1754.98,
      "numberOfPayments": 1,
      "org": "MCK",
      "account": "MCK",
      "subAccount": "MCK002",
      "type": "batch_canceled"
  },
  "time": "2024-12-02T15:24:40. 6048459Z",
  "causationId": "134433a2-387d-48b8-9d7e-ddc7af8c705f"
}
batch\_cancelled Fields
FieldDescriptionExample
orgThe short code for the organizationABC
accountThe short code for the accountABC
subAccountThe short code for the sub-accountABC001
canceledByThe user performing the modification[email protected]
statusThe status of the batchCanceled
typeThe event typebatch_canceled

Batch Funding Completed

Batch has successfully completed funding, and the money is in a Optum-controlled bank account

batch\_funding\_completed Body
{
   "id": "45b93ecf-c718-4255-8485-10228f ca6713",
   "source": "https://example.com",
   "specVersion": "1.0",
   "type": "batch_funding_completed",
   "dataContentType": "application/json",
   "data": {
       "fundingStatus": "Completed",
       "amount": 1754.98,
       "fundingMethod": "PreFundedNextDay",
       "fundingRequestId": "D24BD704KI",
       "initialRequestTime": "2024-11-13T17:55:01.610727",
       "org": "MCK",
       "account": "MCK",
       "subAccount": "MCK005",
       "type": "batch_funding_completed"
   },
   "time": "2024-12-02T15:24:40. 6048459Z",
   "causationId": "134433a2-387d-48b8-9d7e-ddc7af8c705f"
}
batch\_funding\_completed Fields
FieldDescriptionExample
orgThe short code for the organizationABC
accountThe short code for the accountABC
subAccountThe short code for the sub-accountABC001
fundingStatusThe status of the funding requestCompleted
typeThe event typebatch_funding_completed

Batch Funding Failed

Batch has failed funding

batch\_funding\_failed Body
{
  "id": "45b93ecf-c718-4255-8485-10228f ca6713",
  "source": "https://example.com",
  "specVersion": "1.0",
  "type": "batch_funding_failed",
  "dataContentType": "application/json",
  "data": {
      "amount": 1754.98,
      "fundingMethod": "PreFundedSameDay",
      "fundingRequestId": "D24BD704KK",
      "initialRequestTime": "2024-11-13T17:50:12.9370276",
      "fundingStatus": "Failed",
      "org": "MCK",
      "account": "MCK",
      "subAccount": "MCK004",
      "type": "batch_funding_failed"
  },
  "time": "2024-12-02T15:24:40. 6048459Z",
  "causationId": "134433a2-387d-48b8-9d7e-ddc7af8c705f"
}
batch\_funding\_failed Fields
FieldDescriptionExample
orgThe short code for the organizationABC
accountThe short code for the accountABC
subAccountThe short code for the sub-accountABC001
fundingStatusThe status of the funding requestFailed
typeThe event typebatch_funding_failed

Batch Loading Requested

Payments in this batch have started loading into payment networks

batch\_loading\_requested Body
{
  "id": "45b93ecf-c718-4255-8485-10228f ca6713",
  "source": "https://example.com",
  "specVersion": "1.0",
  "type": "batch_funding_requested",
  "dataContentType": "application/json",
  "data": {
      "status": "Funding",
      "fundingStatus": "Requested",
      "amount": 1754.98,
      "fundingMethod": "PreFundedSameDay",
      "fundingRequestId": "D24BD704KI",
      "org": "MCK",
      "account": "MCK",
      "subAccount": "MCK001",
      "type": "batch_funding_requested"
  },
  "time": "2024-12-02T15:24:40. 6048459Z",
  "causationId": "134433a2-387d-48b8-9d7e-ddc7af8c705f"
}
batch\_loading\_requested Fields
FieldDescriptionExample
orgThe short code for the organizationABC
accountThe short code for the accountABC
subAccountThe short code for the sub-accountABC001
statusThe status of the batchLoading
typeThe event typebatch_loading_requested

Batch Loaded

Payments in this batch have started loading into payment networks

batch\_loaded Body
{
  "id": "45b93ecf-c718-4255-8485-10228f ca6713",
  "source": "https://example.com",
  "specVersion": "1.0",
  "type": "batch_loaded",
  "dataContentType": "application/json",
  "data": {
      "loadedPaymentCount": 1,
      "totalNumberOfPayments": 1,
      "amount": 1754.98,
      "org": "ABC",
      "account": "ABC",
      "subAccount": "ABC001",
      "type": "batch_loaded"
  },
  "time": "2024-12-02T15:24:40. 6048459Z",
  "causationId": "134433a2-387d-48b8-9d7e-ddc7af8c705f"
}
batch\_loaded Fields
FieldDescriptionExample
orgThe short code for the organizationABC
accountThe short code for the accountABC
subAccountThe short code for the sub-accountABC001
loadedPaymentCountThe number of payments that have been loaded at least once5
totalNumberOfPaymentsThe total number of payments in the batch5
typeThe event typebatch_loaded

Batch Distributed

All payments in the batch have loaded into at least one (1) payment network (e.g., all payments in the batch have at least one (1) loading.completed event

batch\_distributed Body
{
  "id": "45b93ecf-c718-4255-8485-10228f ca6713",
  "source": "https://example.com",
  "specVersion": "1.0",
  "type": "batch_distributed",
  "dataContentType": "application/json",
  "data": {
      "distributedPaymentCount": 1,
      "totalNumberOfPayments": 1,
      "amount": 1754.98,
      "org": "ABC",
      "account": "ABC",
      "subAccount": "ABC001",
      "type": "batch_distributed"
  },
  "time": "2024-12-02T15:24:40. 6048459Z",
  "causationId": "134433a2-387d-48b8-9d7e-ddc7af8c705f"
}
batch\_distributed Fields
FieldDescriptionExample
orgThe short code for the organizationABC
accountThe short code for the accountABC
subAccountThe short code for the sub-accountABC001
distributedPaymentCountThe number of payments that have been distributed at least once5
totalNumberOfPaymentsThe total number of payments in the batch5
typeThe event typebatch_distributed

Batch Completed

Batch has completed loading and distributing. Published when both the batch_loaded and batch_distribution events have been published for a batch.

batch\_completed Body
{
  "id": "45b93ecf-c718-4255-8485-10228f ca6713",
  "source": "https://example.com",
  "specVersion": "1.0",
  "type": "batch_distributed",
  "dataContentType": "application/json",
  "data": {
      "amount": 1754.98,
      "numberOfPayments": 1,
      "org": "ABC",
      "account": "ABC",
      "subAccount": "ABC001",
      "type": "batch_completed"
  },
  "time": "2024-12-02T15:24:40. 6048459Z",
  "causationId": "134433a2-387d-48b8-9d7e-ddc7af8c705f"
}
batch\_completed Fields
FieldDescriptionExample
orgThe short code for the organizationABC
accountThe short code for the accountABC
subAccountThe short code for the sub-accountABC001
typeThe event typebatch_completed

Payment Removed From Batch

A payment was removed from the batch

payment\_removed Body
{
  "id": "45b93ecf-c718-4255-8485-10228f ca6713",
  "source": "https://example.com",
  "specVersion": "1.0",
  "type": "batch_distributed",
  "dataContentType": "application/json",
  "data": {
      "payment": {
          "batchId": {
              "tenantId": "a976ced5-28ea-4e08-a267-024d2751e591",
              "uniqueId": "48dcb7da68a460bc48c045822fc75bb8"
          },
          "amount": 100.00,
          "issuerPaymentId": "48dc20ff1d97977e65209b927d28dc6b",
          "issuerReferenceId": "EVRYHEALTH004",
          "paymentDate": "2024-08-08",
          "shippingDetails": {
              "name": "John Doe",
              "address": {
                  "address1": null,
                  "address2": null,
                  "city": null,
                  "state": null,
                  "postalCode": null,
                  "country": null
              }
          },
          "remittanceMethod": "DATA",
          "adjudicationCutoffDate": "2024-08-08",
          "adjudicationVersion": "2",
          "jurisdictionalBody": "MN",
          "numberOfAttachedPdfFiles": 2,
          "availableBalance": 0.00,
          "previousAvailableBalance": null,
          "issuer": null,
          "acquirer": {
              "name": "John Doe",
              "taxId": "786532990",
              "address": {
                  "address1": "123 West St.",
                  "address2": "Apt 987",
                  "city": "Dallas",
                  "state": "TX",
                  "postalCode": "75227",
                  "country": "USA"
              },
              "nationalProviderId": null,
              "receiverId": null
          },
          "metaData": null,
          "status": "Created",
          "documentConsolidationStatus": "Requested",
          "paymentNetworks": [],
          "currentPaymentNetwork": null,
          "id": {
              "tenantId": "a976ced5-28ea-4e08-a267-024d2751e591",
              "individualPaymentId": "48dcb7da7936a24048c045833f6566ff"
          },
          "version": 1
      },
      "type": "payment_removed"
  },
  "time": "2024-12-02T15:24:40. 6048459Z",
  "causationId": "134433a2-387d-48b8-9d7e-ddc7af8c705f"
}
payment\_removed Fields

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut enim ad minim veniam, quis nostrud exercitation ullamco. Excepteur sint occaecat cupidatat non proident!

payment_removed Fields

FieldDescriptionExample
paymentThe array of payments associated with the batchABC
payment.batchIdThe batch identifier composed of two identifiers (tenantId, uniqueId)00000000-0000-0000-0000-000000000000
payment.batchId.tenantIdThe tenant identifier
payment.batchId.uniqueIdThe unique batch identifier48dcb7c9b530394c49e5cfab4f081cfb
payment.amountThe individual payment amount100
payment.issuerPaymentIdThe issuer payment identifier48dc20ff1d97977e65209b927d28dc6b
payment.issuerReferenceIdID that can be printed on payment documents to assist with customer serviceEVRYHEALTH001
payment.paymentDateDateOnly date of the payment2024-08-08
payment.shippingDetailsJson object of the shipping information
payment.shippingDetails.nameThe name for the shipping addressJohn Doe
payment.shippingDetails.addressJson object of the address information
payment.shippingDetails.address.address1Address line 1 of the shipping information123 West St.
payment.shippingDetails.address.address2Address line 2 of the shipping informationApt 987
payment.shippingDetails.address.cityThe city of the shipping informationDallas
payment.shippingDetails.address.stateThe state of the shipping informationTX
payment.shippingDetails.address.postalCodeThe postal/zip code of the shipping information75227
payment.shippingDetails.address.countryThe countryUSA
payment.remittanceMethodThe remittance method to be use for this paymentDATA
payment.adjudicationCutoffDateThe adjudication cutoff date2024-08-08
payment.adjudicationVersionThe adjudication version2
payment.jurisdictionalBodyThe jurisdictional bodyMN
payment.numberOfAttachedPdfFilesThe number of attached pdf files2
payment.availableBalanceThey payments available balance (this should be 0 at the time of payment creation)0
payment.previousAvailableBalanceThe previous available balance (this should be 0 at the time of payment creation)0
payment.issuerIssuer informationnull
payment.acquirerThe information about the acquirer
payment.acquirer.nameThe acquirer nameJohn Doe
payment.acquirer.taxIdThe acquirer tax identifier786532990
payment.acquirer.addressJson object of the address information for acquirer
payment.acquirer.address.address1Address line 1 of the shipping information123 West St.
payment.acquirer.address.address2Address line 2 of the shipping informationApt 987
payment.acquirer.address.cityThe city of the shipping informationDallas
payment.acquirer.address.stateThe state of the shipping informationTX
payment.acquirer.address.postalCodeThe postal/zip code of the shipping information75227
payment.acquirer.address.countryThe countryUSA
payment.acquirer.nationalProviderIdThe acquirer's National Provider ID1234567890
payment.acquirer.receiverIdThe acquirer's receiver Id. Required if the payee is different than the person receiving the transaction (e.g., clearinghouse / billing service)string
payment.metaDataThe metadata dictionarydynamic json object
payment.statusThe payment statusCreated
payment.documentConsolidationStatusThe document consolidation statusRequested
payment.paymentNetworksThe associated payment networksjson array
payment.currentPaymentNetworkThe current payment network for this paymentnull
payment.idThe payments composite identifier (tenantId, individualPaymentId){"tenantId": "a976ced5-28ea-4e08-a267-024d2751e591","individualPaymentId": "48dcb7ccfcac025849e5cfac5e3a23f9"}
payment.id.tenantIdThe tenant IDa976ced5-28ea-4e08-a267-024d2751e591
payment.id.individualPaymentIdThe individual payment ID48dcb7ccfcac025849e5cfac5e3a23f9
payment.versionThe version of the payment1
typepayment_removedpayment_removed