Skip to main content

Payment Method

The PostAddPaymentMethod endpoint is responsible for registering a new payment method in the MIMS system.


How to register a payment method​

HTTP POST Request

Request TypeExample URL
POST{{url_base}}/PostAddPaymentMethod
Examplehttp://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddPaymentMethod"

Input Parameters​

ParameterTypeRequiredDescription
PaymentMethodNoString(25)YesExternal code of the payment method
DescriptionPaymentString(40)YesPayment method description
InstallmentQtyIntegerYesNumber of installments
ToleranceDaysIntegerNoTolerance days
TolerancePercentFloatNoTolerance percentage
IsInactiveBooleanNoFlag indicating that the payment method is inactive
ItemListAddPaymentMethodItemListYesList of payment method installments
OverwriteIfExistsBooleanNoFlag indicating that data should be overwritten if the record already exists

📝 AddPaymentMethodItemList Object​

The AddPaymentMethodItemList object represents a list with payment method installments.

Input Parameters​

ParameterTypeRequiredDescription
InstallmentNoIntegerYesInstallment number
InstallmentPercentFloatYesInstallment percentage
DaysIntegerNoDays for installment payment

Return​

ParameterTypeRequiredDescription
WebServiceReturnWebServiceReturnYesStandard WebService response information in method execution
PaymentMethodCodeIntegerYesInternal payment method code generated in the MIMS system

Request Example​

curl --location 'http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddPaymentMethod"' \
--header 'Content-Type: application/json' \
--data '{
"PaymentMethodNo": "PM001",
"DescriptionPayment": "Pagamento à Vista",
"IsInactive": false,
"InstallmentQty": 1,
"ToleranceDays": 0,
"TolerancePercent": 0,
"OverwriteIfExists": true,
"ItemList": [
{
"InstallmentNo": 1,
"InstallmentPercent": 100.0,
"Days": 0
}
]
}'

Response Example​

{
"WebServiceReturn": {
"Status": "wrsSuccess",
"ErrorCode": "",
"Message": "",
"Actor": "",
"ReturnQuestion": null
},
"PaymentMethodCode": 123
}

🐞 Possible Errors​

CodeMessage
APM‑001The provided External Payment Method Code parameter (PaymentMethodNo) already exists!