This article explains how to generate a Recurly payment link from within Salesforce—both via built-in actions on the Recurly Account record and by manually constructing the URL when needed (for example, to collect payment after a failed transaction).
Requirements
- Recurly for Salesforce package installed and configured.
- Access to the Salesforce Recurly Account record that includes the Hosted Login Token.
- The target Recurly invoice number you wish to collect payment for.
What is a payment link? A Recurly payment link is an invoice URL that includes the account’s Hosted Login Token so the customer can securely view the invoice and update payment. The canonical format is:
https://<subdomain>.recurly.com/account/invoices/<Invoice_Number>?ht=<Hosted_Login_Token>.Generate a Payment Link in Salesforce
You can trigger the payment-link workflow directly from the Salesforce Recurly Account record using one of two UI elements provided by the package:
- Button — Sends an email to the account’s email address containing the link to update payment.
- Link — Performs the same action as the button; behavior may depend on your org’s template configuration.
Tip: If your org’s email template is not the Recurly payment template, you can still obtain the raw URL by constructing it manually (see next section) and inserting it into your own template.
Construct the URL Manually
When you need the URL itself (eg. to paste into a custom email) you can build it using fields available on the Recurly Account and the target invoice number:
# Replace the bracketed values with your own
https://<subdomain>.recurly.com/account/invoices/<Invoice_Number>?ht=<Hosted_Login_Token>Inputs
| Value | Where to find it |
|---|---|
<subdomain> |
Your Recurly site subdomain (e.g., zbdev). |
<Invoice_Number> |
Invoice identifier you’re collecting payment for (available in Salesforce or Recurly). |
<Hosted_Login_Token> |
Field on the Salesforce Recurly Account record. |
Examples
Manual Construction
# Example (values redacted)
https://zbdev.recurly.com/account/invoices/INV-001234?ht=HOSTED_LOGIN_TOKEN_VALUECopying into an Email
Subject: Action Required — Complete Your Payment
Hello <First Name>,
Please use the secure link below to complete payment for invoice <Invoice_Number>:
https://<subdomain>.recurly.com/account/invoices/<Invoice_Number>?ht=<Hosted_Login_Token>
If you have any questions, reply to this email and we’ll be happy to help.
Thank you,
<Your Company> Billing Team
Best Practices
- Prefer the built-in Salesforce button/link to ensure the recipient address matches the Recurly Account email.
- Store the Hosted Login Token securely; treat it as a secret tied to customer access.
- Validate that the invoice is open and payable before sharing the link.
- Consider creating a Salesforce Email Template that accepts
Invoice_Numberand merges the constructed URL.
Troubleshooting
- Wrong email template is sent: Update the Salesforce email action to point to the Recurly payment template, or bypass by manually constructing and sending the URL.
- Recipient cannot access the invoice: Verify the Hosted Login Token on the account record and confirm the invoice number is correct.
- No button/link visible: Ensure the Recurly for Salesforce package components are on the Recurly Account page layout and that the user profile has access.
Comments
0 comments
Please sign in to leave a comment.