Hey,
I make a request to get a key of which I get back a keyId
When sending a request to receive a token I get a 400 Error mapping JSON
{ status: 400,
reason: 'JSON_PARSER_ERROR',
message: 'JSON parsing error - JsonMappingException',
correlationId: null,
details:
[ { location: 'Line [1], column [1]',
message: 'Error mapping JSON to field [null]' },
[length]: 1 ],
_embedded: {} },
_links:
{ self: null,
documentation: [ [length]: 0 ],
next: [ [length]: 0 ] } }
Heres what I am sending
{ url: 'https://sandbox.api.visa.com/cybersource/payments/flex/v1/tokens?apikey={my_api_key}',
method: 'POST',
json: true,
headers:
{ Accept: 'application/json',
'Content-Type': 'application/json' },
body: '{"kid":"Returned_KEY","cardDetails":{"cardNumber":"4111111111111111","cardType":"001"}}' }
Also when I send an encrypted card number ie similar to what is in docs, I still get the same error.
Whats the Issue here?
Thanks