Get Payments for a Bill
get
/bcws/webresources/v1.0/payments/bill/{id}
Gets the list of payments applied to the specified bill.
Request
Path Parameters
-
id(required): string
The ID of the bill.
Query Parameters
-
number(required): string
The number of payments to retrieve.
There's no request body for this operation.
Back to TopResponse
Supported Media Types
- application/xml
- application/json
200 Response
The payments were returned successfully.
Nested Schema : paymentList
Type:
Show Source
object
-
billingStatus: integer
(int32)
The billing status. Can be one of the following:
- 1 (Billed)
- 2 (Unbilled)
-
extension: object
extension
The extended attributes.
-
originalPaymentAmount(required): number
The original payment amount.
-
paymentAction: integer
(int32)
Whether the payment has been reversed or suspended. Can be one of the following:
- 0 (Not reversed)
- 1 (Reversed)
- 2 (Suspended)
-
paymentAmount(required): number
The amount of the payment.
-
paymentDate(required): string
(date-time)
The date and time the payment was made.
-
paymentId(required): string
The ID of the payment
-
paymentMethod: integer
(int32)
The payment method. Can be one of the following:
- 10011 (Cash)
- 10012 (Check)
- 10013 (Wire transfer)
- 10014 (Inter-bank payment order)
- 10015 (Postal order)
-
paymentRef: object
ResourceRef
-
unAllocatedAmount(required): number
The amount that is still unallocated.
Nested Schema : extension
Type:
object
The extended attributes.
Nested Schema : ResourceRef
Type:
Show Source
object
-
id(required): string
The ID.
-
uri: string
The Uniform Resource Identifier (URI) associated with the resource.
500 Response
An internal server error occurred.
Examples
This example shows how to get payments for a bill by submitting a GET request on the REST resource using cURL. For more information about cURL, see "Use cURL".
cURL Command
curl -X GET 'http://hostname:port/bcws/webresources/version/payments/bill/0.0.0.1+-bill+83408'
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.
Example of Response Body
This example shows the contents of the response body in JSON format.
[
{
"extension": null,
"paymentAmount": 0,
"paymentDate": 1600343759000,
"paymentId": "P1-252",
"paymentMethod": 0,
"unAllocatedAmount": null,
"originalPaymentAmount": -0.1,
"paymentAction": 2,
"billingStatus": null,
"paymentRef": {
"id": "0.0.0.1+-item-payment+157391",
"uri": null
}
},
{
"extension": null,
"paymentAmount": -1.299,
"paymentDate": 1600343935000,
"paymentId": "P1-257",
"paymentMethod": 0,
"unAllocatedAmount": null,
"originalPaymentAmount": -1.3,
"paymentAction": 0,
"billingStatus": null,
"paymentRef": {
"id": "0.0.0.1+-item-payment+152669",
"uri": null
}
}
]