POST v1/Generic/CustomerPaymentInsert
Create customer payment record(s) in Midnight
Request Information
URI Parameters
None.
Body Parameters
List of customer payments to add
Collection of CustomerPaymentInsert| Name | Description | Type | Additional information |
|---|---|---|---|
| CustomerPaymentDetailList |
CustomerPaymentDetailList |
Collection of CustomerPaymentDetailInsert |
None. |
| CustomerId |
Must match Midnight CustomerId |
integer |
None. |
| AmountBilled |
AmountBilled. Must be greater than 0 and equal to the sum of AmountBilled for CustomerPaymentDetail records. |
decimal number |
None. |
| RequestSource |
Used to decide the validation and payment detail creation logic. IF provided, must be one of - PRCMerchant/Other. Defaults to Other if not provided. |
string |
None. |
| OrderNumber |
Processed only when CustomerPayment.RequestSource = "PRCMerchant". If matches a valid Midnight OrderNumber, the payment detail record is created as Earmarked, otherwise as Escrow. |
string |
None. |
Remarks
None.
Request Formats
application/json, text/json
Sample:
[
{
"CustomerId": 3,
"AmountBilled": 8.0,
"CustomerPaymentDetailList": [
{
"OrderId": 1,
"PaymentLabel": "sample string 3",
"AmountBilled": 4.0
},
{
"OrderId": 1,
"PaymentLabel": "sample string 3",
"AmountBilled": 4.0
}
],
"RequestSource": "sample string 26",
"OrderNumber": "sample string 27"
},
{
"CustomerId": 3,
"AmountBilled": 8.0,
"CustomerPaymentDetailList": [
{
"OrderId": 1,
"PaymentLabel": "sample string 3",
"AmountBilled": 4.0
},
{
"OrderId": 1,
"PaymentLabel": "sample string 3",
"AmountBilled": 4.0
}
],
"RequestSource": "sample string 26",
"OrderNumber": "sample string 27"
}
]
application/x-www-form-urlencoded
Sample:
Response Information
Resource Description
Collection of CustomerPaymentInsertResponse| Name | Description | Type | Additional information |
|---|---|---|---|
| CustomerPaymentId |
CustomerPaymentId |
integer |
None. |
| CustomerPaymentNumber |
CustomerPaymentId |
string |
None. |
| Error |
Error |
MidnightErrorResponse |
None. |
Response Formats
application/json, text/json
Sample:
[
{
"CustomerPaymentId": 1,
"CustomerPaymentNumber": "sample string 2",
"Error": {
"ErrorMessage": [
{
"Key": "sample string 1",
"Message": "sample string 2"
},
{
"Key": "sample string 1",
"Message": "sample string 2"
}
]
}
},
{
"CustomerPaymentId": 1,
"CustomerPaymentNumber": "sample string 2",
"Error": {
"ErrorMessage": [
{
"Key": "sample string 1",
"Message": "sample string 2"
},
{
"Key": "sample string 1",
"Message": "sample string 2"
}
]
}
}
]
