Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Payment with flex token example gives INVALID_DATA error

Open
#66 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript
Domain
api, payments

Research direction

Start by running Samples/Payments/Payments/payment-with-flex-token.js and payment-with-flex-token-create-permanent-tms-token.js as described in the issue, then inspect how each example builds the Flex token payment request. Trace the tokenInformation.jti handling and verify the examples no longer return INVALID_DATA for that field.

Written by the indexing model from the issue text.

Description

When I run the flex token payment example i.e.

node Samples/Payments/Payments/payment-with-flex-token.js

I get the following error in the response:

\"Declined - One or more fields in the request contains invalid data\",\"details\":[{\"field\":\"tokenInformation.jti\",\"reason\":\"INVALID_DATA\"

As these examples are supposed to be self-contained I expected this to work. Does anyone know what the issue is? I did try adding the jti value which you can obtain from the decoded JWT token but this didn't fix the issue.

Also note that the exact same problem applies to the payment-with-flex-token-create-permanent-tms-token.js example.

Dominant language
JavaScript
Stars
43
Forks
66
Avg merge
1d 8h
Merged PRs (30d)
1

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from CyberSource/cybersource-rest-samples-node

All issues in CyberSource/cybersource-rest-samples-node

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.