Skip to content

bug(ack-pay): paymentRequest.serviceCallback rejects DID URIs despite docs and sibling fields #205

Description

@kutluhaneth46

Summary

PaymentRequest.serviceCallback is documented as a URL or DID URI, and sibling fields paymentService / receiptService already use a shared urlOrDidUri schema. serviceCallback is still URL-only in both Valibot and Zod, so a DID callback fails schema parse / signed request creation.

Affected files

  • packages/ack-pay/src/schemas/valibot.ts
  • packages/ack-pay/src/schemas/zod.ts
  • docs/ack-pay/payment-request-payload.mdx (documents URL or DID URI)

Expected

A serviceCallback like did:web:merchant.example should parse the same way paymentService / receiptService do.

Actual

v.url() / z.url() reject DID URIs.

Proposed fix

Reuse urlOrDidUri for serviceCallback in both schema venues and add parity tests.

AI usage disclosure

Drafted with Cursor assistance; I reviewed the schema/docs mismatch and will own the fix.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions