Orchestrate
Creating Accounts
Enrollment Link

Creating Accounts via Enrollment Link

Learn when and how to create processing accounts using enrollment links


Payload enrollment links provide a secure, hosted onboarding experience for processing accounts. By generating a link, you can share a complete application flow with merchants, partners, or internal teams without building custom onboarding UI. This guide covers when to use enrollment links, how to generate them, and how to track enrollment progress.

Prerequisites

Before writing any code, it's helpful to learn about the following topics.


When to use Enrollment Links


Use enrollment links when you need a simple way to onboard processing accounts without building custom onboarding UI in your application. Enrollment links are ideal when you want to share an application URL via email, text, or other channels, allowing merchants to complete onboarding on a Payload-hosted page.

By using enrollment links, compliance, consent, and other legal requirements are handled automatically and abstracted away. The link ensures the submitter is shown and agrees to all required terms, captures attestations, and collects sensitive information directly within a hosted, PCI-compliant environment—removing that responsibility from your application.

Common use cases

  • You want to send an enrollment link via email, SMS, or messaging platforms
  • You need to share an application with multiple parties who can collaboratively fill out information
  • You don't want to embed onboarding UI directly in your application
  • You want a turnkey, compliant, and low-code way to onboard processing accounts
  • You're building an internal tool or back-office system that needs to onboard merchants
  • You want to generate shareable links for sales teams, partners, or affiliates

Generating an Enrollment Link

Creating an enrollment link is a two-step process: create an intent with the account_enrollment_link type, then share the returned URL with the merchant.

Generate a link for a new account

Create an enrollment link that will create a new processing account when completed.

import payload
pl = payload.Session('secret_key_3bW9...', api_version='v2')
 
# Generate an enrollment link for a new processing account
 
 
 
intent = pl.Intent.create(
    type='account_enrollment_link'
)
 
print('Enrollment link:', intent.url)
# Share this URL with the merchant via email, SMS, or other channels

This example creates an intent with:

  1. type='account_enrollment_link' tells Payload to generate a hosted enrollment page
  2. account_enrollment_link configures the link behavior (currently accepts account_template object)

The response includes a url field that contains the secure enrollment link. Share this URL with the merchant via email, SMS, or any other communication channel.

Generate a link for an existing account

If you've already created an account record and want to complete the enrollment via a link, you can pre-fill the account ID.

import payload
pl = payload.Session('secret_key_3bW9...', api_version='v2')
account = pl.Account.create(
 
# Create a processing account first
 
 
    type='processing',
    name='Acme Corporation'
)
 
# Generate an enrollment link for the existing account
intent = pl.Intent.create(
    type='account_enrollment_link',
    account_enrollment_link={
        'account_template': {
            'id': account.id,
            'type': 'processing'
        }
    }
)
 
print('Enrollment link for existing account:', intent.url)

This example:

  1. Creates a processing account first with just a name
  2. Creates an enrollment link with account_template.id set to the account ID
  3. When the merchant completes enrollment, the existing account will be updated with their information

Use this pattern when you want to create account records ahead of time for tracking purposes, or when you need to associate the enrollment with an existing record in your system before sending the link.


Sending Enrollment Links

You can automatically send enrollment links to merchants via email or SMS by including a send_to object when creating the intent. The send_to object requires a name field and either an email or phone field.

Send enrollment link via email

Create an intent and automatically send the enrollment link to the merchant's email address.

import payload
 
pl = payload.Session("secret_key_3bW9...", api_version="v2")
 
# Send an enrollment link via email
 
 
intent = pl.Intent.create(
    type="account_enrollment_link",
    send_to=[
        {
            "name": "John Doe",
            "email": "[email protected]",
        }
    ],
)
 
print("Enrollment link sent to:", intent.send_to[0]["email"])

This example creates an intent with:

  1. type='account_enrollment_link' to generate a hosted enrollment page
  2. send_to object with name and email fields
  3. Payload automatically sends an email with the enrollment link to the specified address

The merchant will receive an email with a secure link to complete their enrollment.

Send enrollment link via SMS

Create an intent and automatically send the enrollment link to the merchant's phone via SMS.

import payload
 
pl = payload.Session('secret_key_3bW9...', api_version='v2')
 
# Send an enrollment link via SMS
 
 
intent = pl.Intent.create(
    type='account_enrollment_link',
    send_to=[
        {
            'name': 'John Doe',
            'phone': '+15555551234',
        }
    ],
)
 
print('Enrollment link sent to:', intent.send_to[0]['phone'])

This example creates an intent with:

  1. type='account_enrollment_link' to generate a hosted enrollment page
  2. send_to object with name and phone fields
  3. Payload automatically sends an SMS with the enrollment link to the specified phone number

The merchant will receive a text message with a secure link to complete their enrollment.

Tracking Enrollment Status

After sharing an enrollment link, you can monitor its status and completion through webhooks and API queries.

Webhook Events

Subscribe to the processing_status webhook trigger to track enrollment progress for processing accounts. Configure a webhook with:

  • trigger: processing_status - Monitors status changes for processing accounts
  • reference_object: account - Specifies the object type being monitored
  • url: Your endpoint URL to receive webhook notifications

Example webhook handler:

from flask import Flask, request
 
app = Flask(__name__)
 
@app.route("/webhooks/payload", methods=["POST"])
def handle_webhook():
    webhook = request.json
 
    print("Account status changed:", webhook["triggered_on"]["id"])
    # Fetch the account to check current status and handle accordingly
 
    return "OK", 200

Query Intent Status

You can also retrieve the intent to check its status:

import payload
 
pl = payload.Session('secret_key_3bW9...', api_version='v2')
 
# Query the status of an enrollment intent
 
 
intent = pl.Intent.get('int_abc123')
 
print('Status:', intent.status)  # 'pending', 'completed', 'expired', etc.

Enrollment Link Options

The Intent schema defines the structure and properties of intent objects in the Payload API. For enrollment links, you can configure various options.

Intent Options

Available fields when creating the intent object:

account_enrollment_link
object
Configuration for the account enrollment link intent. Use this type to generate a hosted onboarding page URL. The enrollment link provides a complete, hosted enrollment experience where businesses can sign up for payment processing on a Payload-hosted page. Returns a URL that can be shared with prospective merchants. Required when type is account_enrollment_link.
account_template
object
Pre-filled account information for the enrollment. Includes the account ID (to link to an existing account) and account type (processing). Use this to pre-populate account details or associate the enrollment with an existing account record.
entity
object
A list of prefilled values for the enrolled account's legal entity. When provided, these values will populate the corresponding fields in the enrollment form.
country
enum[string]
The country that the enrolled legal entity is registered in. Valid countries to register are currently Canada ("CA") and the United States of America ("US").
Values: CA, US
legal_name
string
Pre-filled legal name for the entity being enrolled. For businesses, this is the registered legal business name. For individuals, this is the person's full legal name. When provided, this value will populate the legal name field in the enrollment form.
type
enum[string]
The type of legal entity being enrolled. Must be either "business" (for companies, organizations, or business entities) or "individual" (for individual persons). Determines which onboarding fields and verification requirements apply.
Values: business, individual
id
string
Pre-filled unique identifier for the account being enrolled. When provided, this existing account will be used. If not provided, a new account will be created during enrollment. Use this to link enrollment to an existing account record.
payment_methods
array
A list of payment method templates with prefilled values that will be applied to payment methods associated with this merchant account during enrollment.
type
enum[string]
The type of account being enrolled. Currently only "processing" is supported for account enrollment, which creates a merchant/processor account capable of receiving payments and sending payouts.
Values: processing
results
object
Results from the account enrollment after successful completion. Contains the IDs of the created account. Read-only fields that are populated automatically when the enrollment is finished. Use these to reference the enrollment outputs.
account_id
stringRead-only
The ID of the account that was created or used during account enrollment. Read-only field that is populated after successful completion. Use this to identify which account the enrollment is associated with.

Next Steps

Configure payment routing, monitor KYC results, and build payment flows


Configure Processing Settings and Monitor Onboarding

Set up Processing Settings to configure payment routing and processing preferences, monitor identity verification with KYC Results, subscribe to Webhook Events for account and KYC status updates, and review Processing Accounts Overview to understand processing account capabilities.

Create Payment Flows for Merchants

Accept payments on behalf of processing accounts with Creating Payment Intents, store and manage customer payment methods using Payment Methods, and send payouts to processing accounts with Creating Transfers.

Build Reporting and Reconciliation

Track enrollment and payment metrics with Reporting Overview, create custom reports using Building Report Queries, and monitor payment activity with Transaction Reports for financial reconciliation.

Explore Alternative Onboarding Methods

Embed onboarding forms directly in your application with Enrollment Plugin for a more integrated experience, or use Accounts API for full programmatic control over account creation and onboarding workflows.


Related articles