Customer data

You can read and update the customer data stored at the provider through the provider API wrapper. Use this page when you need to sync profile data or metadata.

Read customer data

$customer = klub()->provider()->customer();

Update customer data

$updated = klub()->provider()->updateCustomer([
  'phone' => '(01) 234 567 89',
]);

Metadata

Many providers accept a metadata payload. Use it to store your own identifiers.

klub()->provider()->updateCustomer([
  'metadata' => [
    'kirby_user_id' => kirby()->user()?->id(),
  ],
]);

Automatic sync

Klub updates the provider when a user changes their email or name via Kirby hooks.

Provider data helpers

Use these helper methods when you need lower-level access to provider data:

  • klub()->provider()->customerId()
  • klub()->provider()->getUserData() / setUserData($data)
  • klub()->provider()->payments() / hasPayment($priceId)
Kirby Klub is not affiliated with the developers of Kirby CMS. We are merely standing on the shoulder of giants.
© 2026 Bruno Meilick All rights reserved.