Submit a Reversal Batch
post
/bcws/webresources/v1.0/batchreversal/submit
Submits each validated record in the reversal batch and returns the records with updated status.
Request
There are no request parameters for this operation.
Supported Media Types
- application/xml
- application/json
Root Schema : schema
Type:
Show Source
object
-
batchInformation: object
BatchInfoType
-
batchRecords(required): array
batchRecords
-
extension: object
extension
The extended attributes.
Nested Schema : BatchInfoType
Type:
Show Source
object
-
batchCurrency: integer
(int32)
The currency of the batch
-
batchDate: integer
(int64)
The date of the batch
-
batchId: string
The ID of the batch
-
batchTotalRecords: integer
(int32)
The total number of records in the batch
-
batchTypeCode(required): string
The payment method type. Allowed Values:
- 10003 (Credit card)
- 10005 (Direct debit)
- 10011 (Cash)
- 10012 (Check)
- 10013 (Wire Transfer)
- 10014 (Inter-bank payment order)
- 10015 (Postal order)
-
batchTypeName(required): string
The name of the batch type. Allowed values: Payment, Refund, or Reversal.
-
extension: object
extension
The extended attributes.
-
lockBoxDate: integer
(int64)
The date of the lockbox
-
lockBoxId: string
The lockbox ID
Nested Schema : extension
Type:
object
The extended attributes.
Nested Schema : extension
Type:
object
The extended attributes.
Nested Schema : BatchRecordsType
Type:
Show Source
object
-
accountCurrency: integer
(int32)
The account currency of the customer's account.
-
accountNumber: string
The customer's account number.
-
accountRef: object
ResourceRef
-
accountType: integer
(int32)
The accounting type associated with the account returned by the SelectItems opcode.
-
allocationDeferred: integer
(int32)
Whether to allocate payments to items (0) or keep them unallocaeted at the account level (1). This only applies to payments, so for refund and reversal batches, this value should be null.
-
amount: number
Amount to be paid, refunded, or reversed.
-
billinfo: array
billinfo
-
billItem: array
billItem
-
billNumber: string
The customer's bill number to which the record should be applied.
-
channelId: integer
(int32)
The description of the channel
-
chargebackDate: integer
(int64)
The date and time the bill item was created.
-
comment: string
Notes associated with the record
-
dueAmount: number
The amount due
-
extension: object
extension
The extended attributes.
-
firstName: string
Person's first name
-
lastName: string
Person's last name
-
originalTransactionDate: integer
(int64)
The original transaction date for reversal batch records
-
payInfo: object
payInfo
The payment information.
-
paymentId: string
The ID of the record.
-
reasonDomainId: integer
(int32)
The reason Domain ID returned by the validation opcode
-
reasonId: integer
(int32)
The reason ID returned in by the validation opcode
-
selectResult: integer
(int32)
The result returned by the SelectItems opcode for validation
-
selectStatus: integer
(int32)
The select status returned by the SelectItems opcode
-
status: integer
(int32)
The status of the record. Allowed values:
- 0 (Input)
- 1 (Validated)
- 2 (Validated (with MBI distribution))
- 3 (Validated (written-off))
- 4 (Suspended)
- 5 (Manually Suspended)
- 6 (Allocate)
- 7 (Error)
- 8 (Submit)
- 9 (Batch Submit Error)
- 10 (Empty)
-
statusCode: integer
The status code for the record
-
statusDescription: integer
(int32)
The status description of the record. Allowed values:
- 0 (Empty)
- 1 (Error finding account or bill)
- 2 (Error selecting items for payment)
- 3 (Payment allocation required)
- 4 (Payment allocation required due to overpayment)
- 5 (Payment allocation required due to underpayment)
- 6 (Payment allocation suggested)
- 7 (Payment allocation suggested due to overpayment)
- 8 (Payment allocation suggested due to underpayment)
- 9 (Multiple payments to the same account are not allowed in the same batch. Remove or modify this row)
- 10 (Bill number and account number mismatch)
- 11 (Currency Conversion Rates)
- 12 (Duplicate Account)
- 13 (Invalid Payment ID)
- 14 (Duplicate Payment ID)
- 15 (Payment has already been reversed)
- 16 (Payment not able to reverse)
- 17 (Error in distribution to Multiple Bill Infos)
Nested Schema : ResourceRef
Type:
Show Source
object
-
id(required): string
The ID.
-
uri: string
The Uniform Resource Identifier (URI) associated with the resource.
Nested Schema : extension
Type:
object
The extended attributes.
Nested Schema : payInfo
Type:
object
The payment information.
Nested Schema : BillinfoType
Type:
Show Source
object
-
accountingType: integer
(int32)
The bill unit's accounting type. Allowed values: 1 (Open item) or 2 (Balance forward).
-
amount: number
The amount allocated.
-
billinfoRef: object
ResourceRef
-
bills: array
bills
-
extension: object
extension
The extended attributes.
-
items: array
items
Nested Schema : extension
Type:
object
The extended attributes.
Nested Schema : BillItemType
Type:
Show Source
object
-
amount(required): number
The amount of the bill item.
-
billinfoRef: object
ResourceRef
-
billRef: object
ResourceRef
-
due: number
The amount due for the bill item.
-
extension: object
extension
The extended attributes.
-
id(required): string
The ID.
Nested Schema : extension
Type:
object
The extended attributes.
Root Schema : schema
Type:
Show Source
object
-
batchInformation: object
BatchInfoType
-
batchRecords(required): array
batchRecords
-
extension: object
extension
The extended attributes.
Nested Schema : BatchInfoType
Type:
Show Source
object
-
batchCurrency: integer
(int32)
The currency of the batch
-
batchDate: integer
(int64)
The date of the batch
-
batchId: string
The ID of the batch
-
batchTotalRecords: integer
(int32)
The total number of records in the batch
-
batchTypeCode(required): string
The payment method type. Allowed Values:
- 10003 (Credit card)
- 10005 (Direct debit)
- 10011 (Cash)
- 10012 (Check)
- 10013 (Wire Transfer)
- 10014 (Inter-bank payment order)
- 10015 (Postal order)
-
batchTypeName(required): string
The name of the batch type. Allowed values: Payment, Refund, or Reversal.
-
extension: object
extension
The extended attributes.
-
lockBoxDate: integer
(int64)
The date of the lockbox
-
lockBoxId: string
The lockbox ID
Nested Schema : extension
Type:
object
The extended attributes.
Nested Schema : extension
Type:
object
The extended attributes.
Nested Schema : BatchRecordsType
Type:
Show Source
object
-
accountCurrency: integer
(int32)
The account currency of the customer's account.
-
accountNumber: string
The customer's account number.
-
accountRef: object
ResourceRef
-
accountType: integer
(int32)
The accounting type associated with the account returned by the SelectItems opcode.
-
allocationDeferred: integer
(int32)
Whether to allocate payments to items (0) or keep them unallocaeted at the account level (1). This only applies to payments, so for refund and reversal batches, this value should be null.
-
amount: number
Amount to be paid, refunded, or reversed.
-
billinfo: array
billinfo
-
billItem: array
billItem
-
billNumber: string
The customer's bill number to which the record should be applied.
-
channelId: integer
(int32)
The description of the channel
-
chargebackDate: integer
(int64)
The date and time the bill item was created.
-
comment: string
Notes associated with the record
-
dueAmount: number
The amount due
-
extension: object
extension
The extended attributes.
-
firstName: string
Person's first name
-
lastName: string
Person's last name
-
originalTransactionDate: integer
(int64)
The original transaction date for reversal batch records
-
payInfo: object
payInfo
The payment information.
-
paymentId: string
The ID of the record.
-
reasonDomainId: integer
(int32)
The reason Domain ID returned by the validation opcode
-
reasonId: integer
(int32)
The reason ID returned in by the validation opcode
-
selectResult: integer
(int32)
The result returned by the SelectItems opcode for validation
-
selectStatus: integer
(int32)
The select status returned by the SelectItems opcode
-
status: integer
(int32)
The status of the record. Allowed values:
- 0 (Input)
- 1 (Validated)
- 2 (Validated (with MBI distribution))
- 3 (Validated (written-off))
- 4 (Suspended)
- 5 (Manually Suspended)
- 6 (Allocate)
- 7 (Error)
- 8 (Submit)
- 9 (Batch Submit Error)
- 10 (Empty)
-
statusCode: integer
The status code for the record
-
statusDescription: integer
(int32)
The status description of the record. Allowed values:
- 0 (Empty)
- 1 (Error finding account or bill)
- 2 (Error selecting items for payment)
- 3 (Payment allocation required)
- 4 (Payment allocation required due to overpayment)
- 5 (Payment allocation required due to underpayment)
- 6 (Payment allocation suggested)
- 7 (Payment allocation suggested due to overpayment)
- 8 (Payment allocation suggested due to underpayment)
- 9 (Multiple payments to the same account are not allowed in the same batch. Remove or modify this row)
- 10 (Bill number and account number mismatch)
- 11 (Currency Conversion Rates)
- 12 (Duplicate Account)
- 13 (Invalid Payment ID)
- 14 (Duplicate Payment ID)
- 15 (Payment has already been reversed)
- 16 (Payment not able to reverse)
- 17 (Error in distribution to Multiple Bill Infos)
Nested Schema : ResourceRef
Type:
Show Source
object
-
id(required): string
The ID.
-
uri: string
The Uniform Resource Identifier (URI) associated with the resource.
Nested Schema : extension
Type:
object
The extended attributes.
Nested Schema : payInfo
Type:
object
The payment information.
Nested Schema : BillinfoType
Type:
Show Source
object
-
accountingType: integer
(int32)
The bill unit's accounting type. Allowed values: 1 (Open item) or 2 (Balance forward).
-
amount: number
The amount allocated.
-
billinfoRef: object
ResourceRef
-
bills: array
bills
-
extension: object
extension
The extended attributes.
-
items: array
items
Nested Schema : extension
Type:
object
The extended attributes.
Nested Schema : BillItemType
Type:
Show Source
object
-
amount(required): number
The amount of the bill item.
-
billinfoRef: object
ResourceRef
-
billRef: object
ResourceRef
-
due: number
The amount due for the bill item.
-
extension: object
extension
The extended attributes.
-
id(required): string
The ID.
Nested Schema : extension
Type:
object
The extended attributes.
Response
200 Response
The submission process is complete.
500 Response
An internal server error occurred.
Examples
This example shows how to submit each validated record in the reversal batch and return the records with updated status by submitting a POST request on the REST resource using cURL. For more information about cURL, see "Use cURL".
cURL Command
curl -X POST 'http://hostname:port/bcws/webresources/v1.0/batchreversal/submit' -H 'content-type: application/json' -d @submit.json
where:
- hostname is the URL for the Billing Care REST server.
- port is the port for the Billing Care REST server.
- version is the version of the API you're using, such as v1.0.
- submit.json is the JSON file that specifies the items to submit.
Example of Request Body
This example shows the contents of the submit.json file sent as the request body.
{
"extension": null,
"batchInformation": {
"extension": null,
"lockBoxId": "LA-136",
"lockBoxDate": 1712926970000,
"batchCurrency": 840,
"batchId": "",
"batchTypeCode": "10012",
"batchTypeName": null,
"batchDate": 1712926495000,
"batchTotalRecords": 0
},
"batchRecords": [
{
"extension": null,
"accountNumber": "0.0.0.1-117491",
"accountCurrency": null,
"paymentId": "T1,66,0",
"accountRef": {
"id": "0.0.0.1+-account+117491",
"uri": null
},
"billNumber": null,
"allocationDeferred": null,
"amount": 2,
"payInfo": {
"PIN_FLD_EFFECTIVE_T": "1712926495000",
"PIN_FLD_REASON_CODE": ""
},
"status": 1,
"statusDescription": 0,
"comment": null,
"firstName": "Thea",
"lastName": "Rivera",
"dueAmount": null,
"channelId": null,
"billItem": [],
"billinfo": [],
"statusCode": null,
"reasonId": null,
"reasonDomainId": null,
"selectResult": null,
"selectStatus": null,
"accountType": null,
"chargebackDate": null,
"originalTransactionDate": 1712908716000
},
{
"extension": null,
"accountNumber": "0.0.0.1-117491",
"accountCurrency": null,
"paymentId": "T1,65,0",
"accountRef": {
"id": "0.0.0.1+-account+117491",
"uri": null
},
"billNumber": null,
"allocationDeferred": null,
"amount": 4,
"payInfo": {
"PIN_FLD_EFFECTIVE_T": "1712926495000",
"PIN_FLD_REASON_CODE": ""
},
"status": 1,
"statusDescription": 0,
"comment": null,
"firstName": "Thea",
"lastName": "Rivera",
"dueAmount": null,
"channelId": null,
"billItem": [],
"billinfo": [],
"statusCode": null,
"reasonId": null,
"reasonDomainId": null,
"selectResult": null,
"selectStatus": null,
"accountType": null,
"chargebackDate": null,
"originalTransactionDate": 1712908168000
}
]
}
Example of Response Body
This example shows the contents of the response body in JSON format.
{
"extension": null,
"batchInformation": {
"extension": null,
"lockBoxId": "LA-136",
"lockBoxDate": 1712926970000,
"batchCurrency": 840,
"batchId": "T1,76",
"batchTypeCode": "10012",
"batchTypeName": null,
"batchDate": 1712926495000,
"batchTotalRecords": 0
},
"batchRecords": [
{
"extension": null,
"accountNumber": "0.0.0.1-117491",
"accountCurrency": null,
"paymentId": "T1,66,0",
"accountRef": {
"id": "0.0.0.1+-account+117491",
"uri": null
},
"billNumber": null,
"allocationDeferred": null,
"amount": 2,
"payInfo": {},
"status": 8,
"statusDescription": 0,
"comment": "",
"firstName": "Thea",
"lastName": "Rivera",
"dueAmount": null,
"channelId": null,
"billItem": [],
"billinfo": [],
"statusCode": null,
"reasonId": null,
"reasonDomainId": null,
"selectResult": null,
"selectStatus": null,
"accountType": null,
"chargebackDate": null,
"originalTransactionDate": 1712908716000
},
{
"extension": null,
"accountNumber": "0.0.0.1-117491",
"accountCurrency": null,
"paymentId": "T1,65,0",
"accountRef": {
"id": "0.0.0.1+-account+117491",
"uri": null
},
"billNumber": null,
"allocationDeferred": null,
"amount": 4,
"payInfo": {},
"status": 8,
"statusDescription": 0,
"comment": "",
"firstName": "Thea",
"lastName": "Rivera",
"dueAmount": null,
"channelId": null,
"billItem": [],
"billinfo": [],
"statusCode": null,
"reasonId": null,
"reasonDomainId": null,
"selectResult": null,
"selectStatus": null,
"accountType": null,
"chargebackDate": null,
"originalTransactionDate": 1712908168000
}
]
}