DocsFRL reference
On this page

    Link guest purchases to verified accounts

    Declare which records belong to a purchase when creating its payment:

    frl

    Rule excerpt: add this to a complete FRL rule before running it. Try a complete example →

    The orders schema must declare a paymentId string and a customer user field. Save the payment's ID in paymentId when creating the order. Up to eight post types can be bound to one payment, each with its own user ownership field. Frontbacked validates these bindings against your schemas.

    Guest checkout remains available without an account. When the customer signs in with a verified matching email, Frontbacked adds their guest purchases to that account. Completing email verification also adds matching purchases. The match stays within the same website and never relies on an email entered in an unsigned request. Existing ownership is preserved, and retrying does not create another order, move money, or fulfil an order again.

    For shipment records with a pending confirmation, a binding may also declare confirmationField: "confirmationId" and confirmationOwnerField: "confirmationUser". Both fields must exist in the shipment schema, with string and user types respectively. Pending confirmations follow the verified purchase owner; completed confirmations retain their original history.

    Keep ownership fields on purchase records restricted to backend writes. New records created by payment events inherit the verified owner even when payment confirmation and account linking happen together.