Payment-link guest access: permissions and sharing
When a customer opens a payment link, they are not logged in. Salesforce treats them as the guest user of your public site: one shared, anonymous identity that every visitor of that site uses. Whatever the guest user can read, any visitor can read. So guest access is set up with care: the guest must be able to open the order behind a live link and pay it, and nothing else.
Four layers do that, and all four are needed:
| Layer | What it decides | Set up in |
|---|---|---|
| Object, field, class and page access | That a guest may use the REDA Pay screens and these record types at all | The REDA Pay - Public Site User permission set, or the same settings on the guest profile |
| Guest sharing rules | Which records: only orders with a live link, their customers, and the setup records the screen needs | Setup → Sharing Settings |
| Public pages | That the link pages open without a login | Experience Builder |
| Guest access to public APIs | That the review summary can read the order's number and amounts | Experience Workspaces → Administration → Preferences |
This article sets up all four for the site that hosts your payment links, with the exact grants. Building the pages and connecting the processing account are in Set up the public payment-link site.
- The public site exists and its link pages are built — see Set up the public payment-link site.
- You are a Salesforce administrator who can edit profiles, permission sets, sharing settings and the site.
- You know whether the Pay Profile is on Payload API v1 or v2 (Choose the Payload API version): v2 needs two more classes and a page, listed below.
Step 1 — Find the site's guest user
Each site has its own guest user and guest profile. Use the ones of the site that hosts the link pages.
- Open Setup → Digital Experiences → All Sites and click Builder next to the site.
- In Experience Builder, click Settings (the gear on the left) → General. Under Guest User Profile, click the profile's name. The guest profile opens in Setup, in a new tab.
- On the profile, click View Users (Assigned Users in the enhanced profile interface): the single user listed is the site's guest user, named <site name> Site Guest User. Note the name; you pick it when you create the sharing rules.
Step 2 — Give the guest access to the REDA Pay objects and screens
Choose one of two equivalent ways.
Option A — Assign the permission set (recommended). From the guest profile's list of users, click the guest user. On the user record, scroll to Permission Set Assignments, click Edit Assignments, move REDA Pay - Public Site User from Available to Enabled, and click Save. The set carries everything in the table below and is kept up to date by REDA Pay upgrades — including the v2 classes and page, which is why it is the recommended option.
Option B — Put the same settings on the guest profile. If your organisation manages guest access only through profiles, edit the guest profile and grant what the permission set contains:
| On the guest profile | Grant |
|---|---|
| Object settings — Pay Order, Pay Customer, Pay Profile, Processing Account, Fee Setup | Read |
| Object settings — Pay Method, Pay Transaction | Read, Create |
| Field-level security on those objects | The same field access as the permission set: open REDA Pay - Public Site User → Object Settings and mirror each object |
| Enabled Apex Class Access (Apex Class Access in the enhanced interface) — classic screens | rpay.NewPayOrderController, rpay.NewPayMethodController |
| Enabled Apex Class Access — v2 screens (profiles on Payload API v2) | rpay.PayloadV2SecureCapture, rpay.PayloadSecureFieldsController |
| Enabled Visualforce Page Access — v2 screens | rpay.PayloadSecureFields (the page that carries Payload's secure form) |
| Enabled Custom Metadata Type Access (Custom Metadata Types) | REDA Pay Process Config, REDA Pay Setup |
The guest gets no Edit, Delete, View All or Modify All on any REDA Pay object. Create is granted on exactly two objects: Pay Method, for the single-use card or bank account the payer enters, and Pay Transaction.
The permission set also enables rpay.PayloadCallback and rpay.PayloadCallbackV2, the classes that receive Payload's webhook messages. A site that serves only payment links does not use them. If you receive webhooks on a separate site, that site's guest needs only those two classes — see Set up webhooks.
Everything an anonymous payer can do, in one table. Note what is missing: no Edit, no Delete.
Step 3 — Create the four guest sharing rules
Object access says the guest may read Pay Orders; the sharing rules say which ones. REDA Pay's records are private to external users, so without these rules every link fails. In Setup → Sharing Settings, scroll to each object's Sharing Rules list, click New, and create:
| Object | Rule Type | Criteria | Include records owned by high-volume users | Share with | Access |
|---|---|---|---|---|---|
| Pay Order | Guest user access, based on criteria | Has Active Link equals True | Ticked | The site's guest user | Read Only |
| Pay Customer | Guest user access, based on criteria | Order Link Expiration Date Time not equal to (blank) | Ticked | The site's guest user | Read Only |
| Pay Profile | Guest user access, based on criteria | Is Active equals True | Not needed | The site's guest user | Read Only |
| Processing Account | Guest user access, based on criteria | Is Active equals True | Not needed | The site's guest user | Read Only |
Click by click, for the Pay Customer rule: New → Rule Name Pay Customer - public link guest → Rule Type Guest user access, based on criteria → under Criteria choose the field Order Link Expiration Date Time, the operator not equal to, and leave the value empty → tick Include records owned by high-volume users → under Share with choose your site's guest user → Access Level Read Only → Save. REDA Pay fills Order Link Expiration Date Time with the latest expiry among the customer's live links and clears it when the last one ends, so the rule matches only customers who have a live link.
The checkbox. A customer who pays in your portal with a Customer Community licence (a "high-volume" licence) owns their Pay Customer record. Such users cannot hold a role, and a sharing rule reaches the records they own only when Include records owned by high-volume users is ticked. Without it, a link sent to that customer shows "Invalid request: Bad request Parameters." while links to customers who never used the portal work — a fault that is hard to recognise from the symptom. The checkbox can be set only when the rule is created; Salesforce refuses to change it afterwards. If your rules exist without it, delete the Pay Order and Pay Customer rules and create them again.
The four rules. Together they open exactly what a live link needs.
The checkbox that makes links work for customers who also pay in your portal. It is set at creation only.
What the guest can and cannot reach
Has Active Link is ticked on a Link order while its link can be used. REDA Pay turns it off when the order is paid, when someone revokes it, and about a minute after the link expires. The order then drops out of the guest's view by itself, with no admin action. In practice:
| Situation | Can the guest open it? |
|---|---|
| A link order created a minute ago | Yes |
| The same order after it is paid | No |
| A link past its expiry, or revoked | No |
| A customer's other links after one of them is paid | Yes — they stay open until each is paid, revoked or expires |
| An Immediate or Schedule order | No: they never have an active link |
| Another customer's link, with the address edited | No: the identifier in the address is encrypted, and an altered one is rejected |
The order identifier in a Link URL is encrypted with your org's key — see Generate the encryption key.
Step 4 — Make the link pages public
- In Experience Builder, open Settings → General and, under Public Access, select Guest users can see and interact with the site without logging in.
- Open each link page (entry, payment, success, error), open its page properties, and set Page Access to Public.
- Publish the site.
Keep any logged-in portal pages on the same site at their own access level: making these four pages public does not open the rest of the site.
Step 5 — Allow guest users to access public APIs
The review summary reads the order through Salesforce's User Interface API. For guests this is off by default on a public site, and the summary then shows its labels with no values. Open Setup → Digital Experiences → All Sites → Workspaces (next to the site) → Administration → Preferences, tick Allow guest users to access public APIs, and Save.
Step 6 — Test as an anonymous payer
- Create a test link for a demo customer: Create and send a payment link.
- Copy the Link URL and open it in a private browser window, where you are not logged in to Salesforce.
- The branded payment screen opens with the amount locked. Choose a method and click Pay: the summary shows the order number and amounts. Cancel without paying.
- Change one character of the address and open it again: the page shows "Invalid request: Bad request Parameters." This proves the guest reaches nothing but a live link.
- Revoke the test order and open the original address again: it no longer opens a payment screen.
- If you have portal customers, repeat the test with a link for a customer who has paid in the portal: it must open too.
Symptoms and what is missing
| What the payer sees | Usually missing | Fix |
|---|---|---|
| A login page | Public access or page access | Step 4 |
| An access error on the page | Object, Apex class or page access for the guest | Step 2 |
| "Invalid request: Bad request Parameters." on every link | The Pay Order or Pay Customer guest rule | Step 3 |
| "Invalid request: Bad request Parameters." only for customers who pay in your portal | The checkbox Include records owned by high-volume users | Step 3: recreate the Pay Order and Pay Customer rules |
| The page opens but no processing account or branding | The Pay Profile or Processing Account guest rule | Step 3 |
| The summary shows labels but no order number or amounts | Allow guest users to access public APIs | Step 5 |
| "The secure payment form could not load…" | On the guest profile: the v2 classes or the Visualforce page; or a content blocker on the payer's device | Step 2 (option B rows for v2); ask the payer to allow payload.com |
Mistakes to avoid
| Mistake | What happens | Fix |
|---|---|---|
| Sharing rules created for the wrong site's guest user | Links still fail | Each site has its own guest user: use the one of the link site |
| Giving the guest Edit or Delete | Anonymous visitors could change records | Grant only what the permission set grants |
| Assigning REDA Pay - Community User to the guest | It grants Edit on Pay Customers and Pay Methods, which anonymous visitors must not have | Use REDA Pay - Public Site User |
| A Pay Order rule without the Has Active Link criterion | Every order becomes readable by anyone | Keep the criterion exactly as above |
| Editing an existing rule to add the portal-owned-records checkbox | Salesforce refuses the change | Delete the rule and create it again with the box ticked |
| Testing while logged in to Salesforce | Your own session hides missing guest access | Test in a private window |
FAQ
They can read only orders whose link is live, and only by knowing the encrypted address you sent. Card and bank numbers are never stored in Salesforce, and on Payload API v2 they are typed into Payload's own form — see Security and card data.
No. The save-a-method pages run as the same guest user with the same access — see Request bank details from a vendor.
Yes. Public link pages and logged-in portal pages can live in one site; set up this guest access for the site's guest user and the portal access for its logged-in users — see Portal access: permissions and sharing for customers.
Their Pay Customer is now owned by their portal user. The Pay Order and Pay Customer guest rules need Include records owned by high-volume users, which can only be set when a rule is created. Recreate those two rules.
Where to go next
- Set up the public payment-link site — the pages, their exact names and the processing account settings.
- Create and send a payment link — your first link.
- Payment link troubleshooting — messages and fixes.