Post-Payment Redirection URLs
Control where customers are redirected after using your paypages.
How it works
Unaric Payments supports redirection based on three distinct outcomes:
- Success: Payment completed successfully.
- Failure: Payment was unsuccessful.
- Cancellation: The customer exited the payment page without completing or attempting payment.
This can be managed at both the organization level, using custom settings, and the individual record level, with dedicated fields for each outcome. To determine which URL to use, Unaric Payments follows a specific order of operations:
- Record level: If an endpoint field on the specific record is populated, the system uses that URL (Overriding the default).
- Org default: If the record field is blank, the system pulls the URL from Custom Settings.
- Fallback: If neither is populated, the user journey continues without a specific redirect (standard behaviour).
Limitations
- Redirection to these endpoints only occurs when processing payments via the Ecommerce URL. Payments processed directly within the Unaric Payments application will not trigger these redirections.
- Redirection to endpoints will not take effect when the paypage is iframed. PostMessages should be used with iframes.
- By default, customers will see a brief Unaric Payments confirmation screen before redirecting. If you wish to bypass this and immediately visit your URL, contact our support team at [email protected].
Setup
Enable record-level overrides
If you want to manually change URLs on specific records:
- In Salesforce, navigate to Setup > Object Manager.
- Locate and select either the Payment or Authorisation object.
- In the left-hand navigation menu, click Page Layouts.
- Select the page layout you want to modify.
- Drag one of these fields from the palette onto the desired section of the layout.
Field name | API name | Description |
|---|---|---|
Success Endpoint | asp04__Success_Endpoint_Long__c | Redirect after successful completion. |
Fail Endpoint | asp04__Fail_Endpoint_Long__c | Redirect after a failed attempt. |
Cancel Endpoint | asp04__Cancel_Endpoint_Long__c | Redirect if the user exits the page. |
- Click Save to apply the changes. Repeat these steps for the other object (either Payment or Authorisation). Once the fields are on the page layouts, users can edit them on individual records to override the organization-level settings.
Set org-level defaults
To use org-level defaults for the endpoint fields:
- Go to Setup > Custom Code > Custom Settings.
- Select Settings.
- Enter the desired URL values in the following settings:
- Authorisation Cancel
- Authorisation Fail
- Authorisation Success
- Payment Cancel
- Payment Fail
- Payment Success
- When you create Payment or Authorisation records, the corresponding endpoint fields will automatically populate with the values from the custom settings.