POST api/cico/ensurePayment
Pre-validates a cash-in or cash-out payment without executing it. Returns success or a specific error code indicating why the payment would fail.
Request Information
URI Parameters
None.
Body Parameters
The payment data to validate. TypeOf must be CashIn or CashOut.
EnsurePaymentRequest| Name | Description | Type | Additional information |
|---|---|---|---|
| fiscalCode | string |
Required Matching regular expression pattern: ^[A-Z0-9]{16}$ |
|
| transferAmount | decimal number |
Required |
|
| typeOf | TypesOfBulletin |
Required |
|
| dui | string |
Required |
|
| selfDeclaredPep | boolean |
None. |
Request Formats
application/json, text/json
{
"fiscalCode": "sample string 1",
"transferAmount": 2.0,
"typeOf": 0,
"dui": "sample string 3",
"selfDeclaredPep": true
}
application/xml, text/xml
<EnsurePaymentRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Buffetti.Cico.Api.Dto"> <DUI>sample string 3</DUI> <FiscalCode>sample string 1</FiscalCode> <SelfDeclaredPep>true</SelfDeclaredPep> <TransferAmount>2</TransferAmount> <TypeOf>Mav</TypeOf> </EnsurePaymentRequest>
application/x-www-form-urlencoded
Sample not available.
Response Information
Resource Description
An with Success = true if all checks pass, or Success = false with one of the following error codes: INVALID_TYPE_OF — TypeOf is not CashIn or CashOut.PEP_MISMATCH — Self-declared PEP but identity status is not ACTIVE_PEP.IDENTITY_VALIDATION_FAILED — Identity validation failed (user not active or unknown status).LIMIT_EXCEEDED — Daily, weekly, monthly or single transaction limit exceeded.DEALER_NOT_AUTHORIZED — The DUI is not authorized or not found.DEALER_NOT_FOUND — The dealer associated to the DUI does not exist.DEALER_NOT_LINKED — The dealer is not linked to any agency.CONVENTION_NOT_CONFIGURED — Convention or receipt configuration is missing for the agency/network.NOT_ENOUGH_PLAFOND — Agency has no available funds and no fido (CashIn only).FIDO_NOT_ENOUGH — Available fido is less than the requested amount (CashIn only).
EnsurePaymentResponse| Name | Description | Type | Additional information |
|---|---|---|---|
| success | boolean |
None. |
|
| errorCode | string |
None. |
|
| errorMessage | string |
None. |
Response Formats
application/json, text/json
{
"success": true,
"errorCode": "sample string 2",
"errorMessage": "sample string 3"
}
application/xml, text/xml
<EnsurePaymentResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Buffetti.Cico.Api.Dto"> <ErrorCode>sample string 2</ErrorCode> <ErrorMessage>sample string 3</ErrorMessage> <Success>true</Success> </EnsurePaymentResponse>