Skip to content

Fix Doku timestamp format to match API specification - #438

Merged
mnindrazaka merged 1 commit into
mainfrom
claude/trusting-keller-icpu5c
Sep 11, 2026
Merged

Fix Doku timestamp format to match API specification#438
mnindrazaka merged 1 commit into
mainfrom
claude/trusting-keller-icpu5c

Conversation

@mnindrazaka

Copy link
Copy Markdown
Collaborator

Summary

Updated the timestamp formatting in the Doku payment integration to match the API's expected format by removing millisecond precision.

Changes

  • Modified formatTimestamp() to use "2006-01-02T15:04:05Z07:00" format instead of "2006-01-02T15:04:05.000Z07:00" (removed .000 milliseconds)
  • Updated TestFormatTimestamp_ParsesBackAsRFC3339Nano test to:
    • Rename to TestFormatTimestamp_MatchesDokuFormat for clarity
    • Use a concrete expected value assertion instead of round-trip parsing
    • Parse with time.RFC3339 instead of time.RFC3339Nano to match the new format
    • Truncate nanoseconds when comparing since the formatted output only includes second precision

Implementation Details

The Doku API expects timestamps without millisecond precision. The test now validates the exact format string rather than relying on round-trip parsing, making the expected format explicit and easier to maintain.

https://claude.ai/code/session_0185MLCLoqJnXLWVHV45aGSv

DOKU rejects the access token request with "Invalid Field Format
X-TIMESTAMP" because it expects yyyy-MM-ddTHH:mm:ssXXX (e.g.
2020-12-21T14:56:11+07:00) without a fractional-seconds component.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0185MLCLoqJnXLWVHV45aGSv
@vercel

vercel Bot commented Sep 11, 2026

Copy link
Copy Markdown

Deployment failed for project gatherloop-pos with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/m-nindra-zakas-projects-ae6b8849?upgradeToPro=build-rate-limit

@mnindrazaka
mnindrazaka merged commit d5c562c into main Sep 11, 2026
3 of 6 checks passed
@mnindrazaka
mnindrazaka deleted the claude/trusting-keller-icpu5c branch September 11, 2026 01:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants