hello,I send the post request to the interface https://sandbox.api.visa.com/visadirect/mvisa/v1/merchantpushpayments but I receive 400 code status and response code like this:
{
"errorMessage": "API Validation Error: 3001. Mandatory field 'localTransactionDateTime' is missing or has invalid content."
}
How can I solve this problem?
This is my localTransactionDataTime : "2023-05-11T02:56:26" , I have not found something error.
Hi @bysenior., Thank you for reaching out. An agent will look into this and get back to you soon. Until then, if any community member knows a solution, feel free to reply in this thread.
Hey @bysenior,
The 400 status code and the error message "API Validation Error: 3001. Mandatory field 'localTransactionDateTime' is missing or has invalid content." indicate that there is an issue with the `localTransactionDateTime` field in your request payload.
Here are some steps to resolve this issue:
1. Ensure Correct Format:
The `localTransactionDateTime` field must be in the correct format as specified in the Visa Direct - mVisa API documentation. The expected format is `yyyy-MM-dd'T'HH:mm:ss`.
2. Check for Typographical Errors:
Make sure there are no typographical errors in the field name or its value.
3. Validate Timezone:
Ensure that the date and time are correctly formatted and include the timezone if required by the API.
Here is an example JSON payload with the correct format for `localTransactionDateTime`:
```json
{
"localTransactionDateTime": "2023-05-11T02:56:26",
"amount": "124.05",
"senderPrimaryAccountNumber": "4895142232120006",
"recipientPrimaryAccountNumber": "4895142232120007",
"transactionCurrencyCode": "USD",
"merchantCategoryCode": "6012",
"acquirerCountryCode": "840",
"retrievalReferenceNumber": "330000550000",
"systemsTraceAuditNumber": "451001"
}
```
Ensure the `localTransactionDateTime` is correctly placed in the payload.
4. Consult the API Reference:
Refer to the Visa Direct - mVisa API documentation at https://developer.visa.com/capabilities/visa_direct/reference to ensure that you are complying with all the required fields and their formats.
5. Use Proper Headers:
Make sure you are setting the correct HTTP headers, including `Content-Type: application/json`.
If the issue persists, please provide screenshots of the errors and the following information:
1. End Point
2. Request Header
3. Request Body
4. Response Header (include the x-correlation-id)
5. Response Body