Skip to content

Add updateVatlyCustomer() method #2

@sandervanhooft

Description

@sandervanhooft

Summary

Add methods to update customer details at Vatly.

Current State (March 2026)

✅ Billing Address Updates — Available

Vatly uses a redirect flow for billing updates (more secure, handles payment mandates properly).

Existing endpoint:

PATCH /subscriptions/{subscriptionId}/update-billing

Returns a hosted checkout URL (30-min expiry) where customer can update billing details.

SDK can wrap this — return the redirect URL for the merchant to send to their customer.

🔄 Payment Method Updates — In Progress

Tracked in Vatly core: #1004

Will provide a signed route (non-expiring) similar to customer invoice links:

/customer/update-payment/{customer}?signature=xxx

SDK can generate/wrap this once available.

⏸️ Direct Field Updates (email, locale, metadata) — Not Planned

No direct PATCH /customers/{id} endpoint exists. Updates flow through checkout for security/consistency.

If there's demand for simple field updates (email changes, metadata), a lightweight endpoint could be added to Vatly core.

Revised Acceptance Criteria

  • API: Billing update via redirect flow (exists)
  • API: Payment method update URL (#1004)
  • SDK: requestBillingUpdate(subscriptionId) → returns redirect URL
  • SDK: requestPaymentMethodUpdate(customerId) → returns signed URL (pending #1004)
  • Documented in README

Notes

Vatly's architecture intentionally uses redirect flows rather than direct mutations for billing/payment updates. This ensures proper mandate handling and security.

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