Payment Gateway

In Blackthorn | Payments, a Payment Gateway record is synonymous with a gateway (i.e. Stripe, etc.) account. Each Payment Gateway record you create connects your Salesforce org to one gateway account, in either test or live mode. To have your gateway account in both test and live mode, create two Payment Gateway records. There is no limit on the number of Payment Gateway accounts you can connect to your org.


Note on Payment Gateway records

Do not change your Payment Gateway record from Test to Live mode or vice versa by clicking Connect to Gateway or checking/unchecking the Test Mode checkbox. Instead, create a new record for the other mode you wish to enable.

First Payment Gateway Record


Your first Payment Gateway record, named "primary" was created automatically during the Setup Wizard.

  1. Navigate to the Payment Gateway object.

Lightning/Classic: Payments (Admin) App | Click the "Payment Gateways" Tab

  1. Select All from the list of List Views.

  2. Click on the record named "primary".

If you connected to your gateway account in "Test" mode, the Test Mode field will be checked

  • The Default field is checked.
    Objects with a Payment Gateway lookup field (such as Transaction and Payment Method) will default to the Payment Gateway record marked 'Default' if the field is left blank on save.

  • The Gateway Information section provides all the connection details.
    If these fields are blank, data in Salesforce will not process in the gateway. Do not copy your Stripe API keys and insert them here as these keys are different than your Stripe keys (they are OAuth keys). You can only get them by clicking the Connect to Stripe button.

Create Payment Gateway Records

Each Stripe account mode (Test and Live ) needs its own Payment Gateway record.
This is to ensure that your data is separated from Live and Test.

For example, if you connected to your account in Test mode during setup, create a new Stripe Payment Gateway record for Live mode.

  1. Navigate to the Payment Gateway Object.

Lightning/Classic: Payments (Admin) App | Click the "Payment Gateways" Tab

  1. Click New.

  2. Populate the following fields:
    Payment Gateway Name = Name for this record.
    Webhook Label = Name for the webhook URL. This is needed to configure Webhooks.
    Default= Check this field if you want this as your default Payment Gateway.
    If you have multiple Stripe Payment Gateway accounts, you can change which one should default.
    Test Mode = Check this field if you are connecting to the Test mode in your Stripe account.

  3. Click Save.

  4. Click the Connect to Gateway button.

  5. Enter your Stripe Credentials.

Once you sign in, all fields under the "Gateway Information" section in the Payment Gateway record will be filled out.

:sparkles: You're all set! :sparkles:



There will be no data in the "Related Lists" section. Connecting to your Stripe Account does not automatically sync existing data over into Salesforce. If you have data in your Stripe Account that needs to come over into Salesforce, see our Historical Sync documentation.

Available and Pending Balances

There are several fields and a button on the Payment Gateway object to track your available and pending balances for both Salesforce and Stripe. Having both balances allows you to compare your Stripe and Salesforce balances.


  • Available Balance and Pending Balance fields are updated through Stripe's Balance.Available or Account.Updated Webhook Events.

  • Stripe Balances Last Updated This date and time field will update when the balances are updated.
    This gives you insight when the two balances were last updated.

  • Held in Reserve field are the funds held from your account due to negative balances on Connected Accounts. This field is automatically updated from Stripe through a webhook.


  • Calculate Salesforce Balances From field is for calculating historical transactions that were processed through Stripe before the balance fields were packaged.

  • Salesforce Balance Available and Salesforce Balance Pending fields are automatically calculated based on related Transactions.
    If the related Transaction's status is "Available" then the Retained Net Amount is rolled up to the Available Balance. If the Transaction's status is "Pending" then the Retained Net Amount is rolled up to the Pending Balance.

  • Stripe Balances Last Updated This date and time field will update when the balances are updated.

  • Balance(s) incorrect When this field is checked, it means the Stripe and Salesforce Available and Pending Balances do not match. They often will not based upon timing of the Stripe webhook and the Salesforce batch process running.

  • Update Balance button.
    There is a daily apex job that runs and updates the Salesforce and Stripe available and pending balances. Clicking this button forces the job to run immediately.
    Please note, if you have high Transaction volume, don't click the Update Balance. You will run into a query limit error.

Scheduled Apex Job

There is scheduled Apex Job called, "Blackthorn | Payments Balance Update" that runs daily. This job updates the Salesforce and Stripe available and pending balances on the Payment Gateway record(s).

  1. Navigate to Setup.

  2. In the Quick Find/Search, type in and click Scheduled Jobs.

Blocking Amex Payment Methods

Some providers like Stripe charge higher fees for using the American Express Payment Method. In order to help customers mitigate these extra fees we've provided a field on the Payment Gateway object to block Transactions from the REST API that are attempting to charge a payment with an American Express card. This field is labeled Block Amex Transactions In Rest API. This can be used with:

  • PayLink
  • DocumentLink
  • REST API requests (custom front end code)

Don't forget to add this field to your Payment Gateway page layout if you would like to use it.

An example of what a customer will see if the Block Amex Transactions In Rest API checkbox = "True":

Payment Gateway Owner - Known Limitation

If you have configured a Sharing Rule for the Payment Gateway object, there is a known limitation in Salesforce if the Payment Gateway owner is listed as "Automated Process User". If your Payment Gateway Owner field is displaying the value to be "Automated Process User" you may notice that Sharing Rules are not being applied. The work around for this would be to update the Owner field to reflect another user in your org, perhaps the System Administrator. Read more about this here.


If you have received an error with your Payment Gateway or have a question, please view our Troubleshooting and Frequently Asked Questions.

Did this page help you?