Payment Connect

How to set a recurring payment

1. Overview

Payment Connect enables you to schedule automatic recurring payments using securely stored payment methods. Once configured, the system automatically generates and captures payments based on the defined frequency—eliminating the need for manual intervention.

Recurring payments can be initiated from the Payment Console or set up programmatically via Apex automation.


2. Log In to Salesforce

➡ Access your Salesforce org with the appropriate credentials.


3. Navigate to the Source Record

Open existing record or create a new one
  1. Go to the Payment Connect App

image-20260529-091804.png
  1. Search for the Record from where you want to initiate the Search.

image-20260529-091908.png



4. Steps to Set Up a Recurring Payment

  1. Navigate to the Payment Console screen.

image-20260529-123756.png
  1. Select the Payment Gateway from the dropdown. The gateway marked as default is auto-selected.

  2. Fill all the payment details or select any payment method from the drop down.

  3. Enter the amount.

  4. In the Payment Controls section, Select the Recurring payment from the drop down.

  5. Set the start date from which the payment will start capturing.

  6. Set the end date which will be used to stop the recurring payments.

  7. Select the frequency (after how many times the payment should be capture, like -: Weekly, Monthly etc).

image-20250624-144258.png


  1. Enter Billing Address if enabled by the gateway.

  2. Click Submit Payment.

image-20260529-141305.png

5. What Happens in Salesforce

5.1 Payment Method Record Created

  • A secure Payment Method record is created (if new).

  • Credentials are double-encrypted.


5.2 Recurring Payment Record Created

A Recurring Payment record is created with:

  • Start Date and End Date

  • Frequency (Weekly, Monthly, etc.)

  • Amount

  • Associated Payment Method

  • Status = Active (after passing the end date it will be deactivated)

  • Due Amount (previous payment due)


5.3 Payment Transaction Record Created

If the start date is same as today then we will capture a payment and a Payment Transaction record is created with:

  • Linked with Payment Method ID.

  • Associated with Recurring payment.

  • Amount which will be captured.

  • Payment Status will be Accepted/Capture.

  • Payment Gateway ID will be linked


5.4 Batch to Capture Recurring Payments

  • A scheduled batch job named BatchRecurringPaymentProcess:

    • Periodically scans active recurring payment records.

    • On each recurrence, it:

      • Creates a new Payment Transaction record.

      • Automatically calls the Capture API using the stored credentials.

      • Updates the Payment Status accordingly.

      • Adjust the Next Schedule date based on the Frequency and Status on the Recurring Payment Record


6. Retry Failed Payment

If a recurring payment transaction fails, Payment Connect determines how to handle the failed transaction based on the configuration defined in the Custom Metadata Type Payment Connect Common Settings and its metadata record RetryFailedTransactionsDaily.

  • When RetryFailedTransactionsDaily is set to True
    The system automatically retries all previously failed recurring payment transactions daily through a scheduled batch process.

  • When RetryFailedTransactionsDaily is set to False
    The system defers retrying failed transactions until the next scheduled payment date. On that date, it captures both the due amount (from the failed attempt) and the regular recurring amount together.

This configuration provides flexibility in how failed recurring payments are recovered — either through daily automatic retries or combined capture in the next payment cycle.