Skip to content

Add terminalId and additionalInfo to DOKU QRIS generation - #441

Merged
mnindrazaka merged 2 commits into
mainfrom
claude/busy-wright-50xk86
Sep 11, 2026
Merged

Add terminalId and additionalInfo to DOKU QRIS generation#441
mnindrazaka merged 2 commits into
mainfrom
claude/busy-wright-50xk86

Conversation

@mnindrazaka

Copy link
Copy Markdown
Collaborator

Extends the DOKU QRIS payment integration to include terminalId and additionalInfo fields in the qr-mpm-generate request, as required by the DOKU API.

Changes:

  • Configuration: Added three new environment variables to Env struct:

    • DOKU_TERMINAL_ID (required): alphanumeric identifier for the terminal, 3–16 characters
    • DOKU_MERCHANT_POSTAL_CODE (optional): postal code for additionalInfo.postalCode
    • DOKU_QRIS_FEE_TYPE (optional): fee type for additionalInfo.feeType
  • Request payload: Updated generateQrisRequest to include:

    • terminalId (mandatory)
    • validityPeriod (optional, derived from ExpiredAt input)
    • additionalInfo object (always sent, even when both postal code and fee type are unset)
  • Validation: Made DOKU_TERMINAL_ID a required configuration field; validation fails if unset.

  • Test coverage: Added tests verifying that terminalId, validityPeriod, and additionalInfo are correctly populated in the request; also verified that additionalInfo is always sent as an object even when empty.

  • Stub server: Updated dokustub to validate the presence of terminalId and additionalInfo in incoming requests.

  • Documentation: Updated .env.example and PRD to reflect the new required and optional fields.

https://claude.ai/code/session_011a51Vvk7CzJnGbiKhDCoZC

…rate QRIS

DOKU's SNAP qr-mpm-generate requires terminalId and an additionalInfo
object, neither of which the request body carried, so every generation
was rejected.

terminalId comes from a new required DOKU_TERMINAL_ID; additionalInfo is
always sent as an object and carries the optional postalCode and feeType
from DOKU_MERCHANT_POSTAL_CODE and DOKU_QRIS_FEE_TYPE. validityPeriod is
derived from the payment's expiry, which already follows
DOKU_QRIS_EXPIRY_SECONDS.

The stub gateway now rejects a generate call missing any mandatory field,
so e2e catches a regression instead of passing on a body DOKU would
refuse.

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

vercel Bot commented Sep 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
gatherloop-order Ready Ready Preview Sep 11, 2026 3:54am UTC
gatherloop-pos Ready Ready Preview Sep 11, 2026 3:54am UTC
gatherloop-ui-storybook Ready Ready Preview Sep 11, 2026 3:54am UTC

@vercel

vercel Bot commented Sep 11, 2026

Copy link
Copy Markdown

Deployment failed for project gatherloop-order 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

@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

Copy link
Copy Markdown
Collaborator Author

The two failing checks on 889c9a2Vercel – gatherloop-pos and Vercel – gatherloop-order — are not this PR's. Both report Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day"): the Vercel account hit its free-plan daily deployment cap, which affects every PR in the repo today regardless of its diff. This PR touches apps/api (Go) and workflow/doc files only; nothing in it changes either Next app's build. Both projects deployed green on the previous head, 80ec4e4.

There is no fix to port — it clears when the 24-hour window rolls over, or sooner on a plan upgrade. I have no Vercel access from here, so I can't re-run the deployments, and a re-run inside the window would fail identically anyway.

GitHub Actions is unaffected: apps/api tests passed on 80ec4e4 and is re-running on the current head; libs/ui tests is correctly skipped since no UI files changed.


Generated by Claude Code

@mnindrazaka
mnindrazaka merged commit e5e7751 into main Sep 11, 2026
4 of 7 checks passed
@mnindrazaka
mnindrazaka deleted the claude/busy-wright-50xk86 branch September 11, 2026 03:54
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