Hi,
this is my first request call,
Body is the same provided in Api references
curl --location 'https://sandbox.api.visa.com/rtx/api/v1/requestToPay' \
--header 'accept: application/json' \
--header 'keyID: 2cf0a316-9b0d-4310-88bd-e8f8ce4a1eed' \
--header 'x-request-affinity: RFP11664782648731jRko01' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic NVpKNjAwSjlWOTY2WVRZU0pSWkQyMUJNektLMWNWVW9BX2lXc1N0Yl9TXzlfUlJBVTpMaFhKQXdlSEhJalA3' \
--data '{
"product": "VD",
"useCase": "B2C",
"requestReason": {
"references": [
{
"referenceType": "INVOICEID",
"referenceDate": "2025-02-01",
"referenceValue": "1234567890"
}
],
"paymentPurpose": "SVCS",
"message": "For lunch",
"unicodeEmoji": "U+1F382"
},
"paymentRequests": [
{
"debtorLastName": "B.",
"debtorAlias": "+447709123457",
"debtorAgentCountry": "UA",
"debtorCountry": "UA",
"requestedAmount": 100,
"requestedAmountCurrency": "UAH",
"endToEndId": "RFPid0001",
"debtorFirstName": "John",
"debtorAgentId": "VD123445",
"debtorAliasType": "MOBL"
}
],
"dueDate": "2025-02-01",
"requestMessageId": "GG9983636387737JH",
"settlementOptions": [
{
"settlementSystem": "VISA_DIRECT",
"primaryAccountNumber": "4145124125553222"
}
],
"creditor": {
"creditorLastName": "F.",
"creditorAliasType": "MOBL",
"creditorFirstName": "Alex",
"creditorCountry": "UA",
"creditorAgentId": "12379879797989",
"creditorAgentCountry": "UA",
"creditorBusinessName": "Mini-Corp Inc.",
"creditorAlias": "+1231231234",
"creditorMcc": "1234",
"creditorId": "BL1234567890",
"creditorIdType": "AGENT",
"nationalIdentifiers": [
{
"type": "PASSPORT",
"value": "LB44889298222"
}
],
"creditorTaxId": "HMRC1234567890"
},
"requestOptions": {
"allowMultiplePayments": true,
"closeWithFirstPayment": false,
"reminderSchedule": [
"2023-05-30T09:30:47Z",
"2023-06-11T11:22:33Z",
"2023-07-11T11:45:13Z"
]
},
"creationDateTime": "2025-02-01T16:20:47Z"
}'
Response:
{
"responseStatus": {
"code": "9501",
"severity": "ERROR",
"message": "Invalid input found, please correct the input data",
"info": "",
"status": "400"
}
}
Hi @mohammad25, Thank you for reaching out. An agent will get back to you as soon as possible. Until then, if any community member knows a solution, feel free to reply in this thread.
Hey @mohammad25,
The error code `9501` with the message "Invalid input found, please correct the input data" indicates that there is something wrong with the request payload. Let's review the request body to identify potential issues. Here are a few things to check:
1. Date Formats and Future Dates: Ensure that the date formats are correct and that the dates provided are valid and logically consistent. The `referenceDate`, `dueDate`, and `creationDateTime` should be in a valid ISO 8601 format, and dates should not be unrealistic.
2. Field Values and Types: Verify the values and types for each field. For example, make sure that numeric fields contain numbers, and string fields contain strings.
3. Required Fields: Confirm that all required fields are present and correctly filled.
Here is a revised version of your request call:
```bash
# START
curl --location 'https://sandbox.api.visa.com/rtx/api/v1/requestToPay' \
--header 'accept: application/json' \
--header 'keyID: 2cf0a316-9b0d-4310-88bd-e8f8ce4a1eed' \
--header 'x-request-affinity: RFP11664782648731jRko01' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic NVpKNjAwSjlWOTY2WVRZU0pSWkQyMUJNektLMWNWVW9BX2lXc1N0Yl9TXzlfUlJBVTpMaFhKQXdlSEhJalA3' \
--data '{
"product": "VD",
"useCase": "B2C",
"requestReason": {
"references": [
{
"referenceType": "INVOICEID",
"referenceDate": "2025-02-01",
"referenceValue": "1234567890"
}
],
"paymentPurpose": "SVCS",
"message": "For lunch",
"unicodeEmoji": "U+1F382"
},
"paymentRequests": [
{
"debtorLastName": "B.",
"debtorAlias": "+447709123457",
"debtorAgentCountry": "UA",
"debtorCountry": "UA",
"requestedAmount": 100,
"requestedAmountCurrency": "UAH",
"endToEndId": "RFPid0001",
"debtorFirstName": "John",
"debtorAgentId": "VD123445",
"debtorAliasType": "MOBL"
}
],
"dueDate": "2025-02-01",
"requestMessageId": "GG9983636387737JH",
"settlementOptions": [
{
"settlementSystem": "VISA_DIRECT",
"primaryAccountNumber": "4145124125553222"
}
],
"creditor": {
"creditorLastName": "F.",
"creditorAliasType": "MOBL",
"creditorFirstName": "Alex",
"creditorCountry": "UA",
"creditorAgentId": "12379879797989",
"creditorAgentCountry": "UA",
"creditorBusinessName": "Mini-Corp Inc.",
"creditorAlias": "+1231231234",
"creditorMcc": "1234",
"creditorId": "BL1234567890",
"creditorIdType": "AGENT",
"nationalIdentifiers": [
{
"type": "PASSPORT",
"value": "LB44889298222"
}
],
"creditorTaxId": "HMRC1234567890"
},
"requestOptions": {
"allowMultiplePayments": true,
"closeWithFirstPayment": false,
"reminderSchedule": [
"2023-05-30T09:30:47Z",
"2023-06-11T11:22:33Z",
"2023-07-11T11:45:13Z"
]
},
"creationDateTime": "2025-02-01T16:20:47Z"
}'
# END
```
If the error persists, you might want to check the Visa Developer API documentation for the `Request to Pay API` to ensure all required fields are correctly populated and adhere to the expected formats.