Payment Gateway Customer
  • 21 Aug 2023
  • 5 Minutes to read
  • Dark
    Light

Payment Gateway Customer

  • Dark
    Light

Article Summary

Matching Rule Update

Users upgrading Payments will need to manually deactivate the current Payment Gateway Customer Dup Rule matching rule and activate the new Payment_Gateway_Customer_Matching_Rule2 matching rule. The new matching rule will be installed automatically for new installations.

The Payment Gateway Customer object connects your Salesforce customers' (Accounts and/or Contacts) with your Stripe customers' accounts. Stripe maintains a single entity by which cards, payments, and all other Stripe records relate to (something like a Person Account in Salesforce). All Stripe related data ultimately relates back to a Payment Gateway Customer record (except with Stripe Connect).

This object works mainly in the background and requires no user setup. For example, a new Payment Method will either trigger the creation of a new Payment Gateway Customer record or relate to an existing one based on the Payment Method's Email and related Payment Gateway.

Note on Account, Contact, and Lead Matching

In Payments version 4.163 and above, we no longer use hard-coded logic (Email and First Name) to match Payment Gateway Customers to Accounts, Contacts, or Leads when these lookup fields are blank. The matching will now use your active standard or custom Salesforce Duplicate Rules and their associated Matching Rules.

Click here to learn more about the criteria evaluated in the Salesforce Standard Matching rules.

Click here to learn more about creating custom matching rules and click here to learn how to use those matching rules in custom Duplicate Rules.

Matching, PGC Records, and the Mobile Payments App

To prevent duplicate Payment Gateway Customer (PGC) records from being created when using the Mobile Payments app and a card reader, the following changes were made.

  • If a payment is submitted and a Contact or Account is selected, the Contact/Account will be related so future payments are matched to the existing PGC, preventing duplicate PGC records from being generated.
  • If a PGC record can't be matched to an id, we will attempt to match the PGC record against the parent Contact/Account and use the parent’s PGC record instead of creating a new record. If we find an exact match, we will reuse the existing PGC record.

Example

The following records exist: PGC 1 is related to Account 1 and Contact 3.

  • Scenario 1: If a new Transaction is created. It is related to only Contact 3. The Transaction would generate a new PGC record called PGC 2.
  • Scenario 2: A second Transaction is created. Transaction 2 is related to Account 1 and Contact 3. Transaction 2 will use PGC 1.
  • Scenario 3: A third Transaction is created. Transaction 3 is only related to Contact 3. Transaction 3 will use PGC 2.

About the Payment Gateway Customer Record

H_01_08 payment gateway customer

  1. Navigate to the Payment Gateway Customer object.

Lightning: Click on the App Launcher | Under "All Items" | Click on Payment Gateway Customers.

Classic: Click on "All Tabs" ("+" icon in the top right) | Click on Payment Gateway Customers.

  1. Click on the Name of any Payment Gateway Customer.
    If you don't see any Payment Gateway Customer records, that means you have not created any Payment Methods or synced any data from Stripe.
  • Email and Description are the only two fields on the record that will update between Stripe and Salesforce when Webhooks is configured.
  • The "Related To" fields Account and Contact are lookup type fields to the standard Account and Contact objects.
    They are automatically filled in from the related Payment Method's Contact and/or Account values.
  • Account Balance: The customer's current balance.
  • Coupon: When defined, the customer will have a discount applied on all recurring charges.
  • Invoice Prefix: The prefix for the customer used to generate unique invoice numbers.
  • Billing Postal Code

Note
Place the Payment Gateway Customer object on your Account and Contact page layouts as a Related List if you have multiple Payment Gateways. Since there can only be one Payment Gateway Customer to one Payment Gateway, you will be able to tell which Accounts and/or Contacts are on more than one Payment Gateway.

Create a Payment Gateway Customer

Option 1

  1. Navigate to the Payment Gateway Customer object.

Lightning: Click on the App Launcher > Under "All Items" > Click on Payment Gateway Customers.

Classic: Click on "All Tabs" ("+" icon in the top right) > Click on Payment Gateway Customers.

  1. Click New.
  2. Populate the Name, Payment Gateway, Email, and Description fields.

If you want to relate this Payment Gateway Customer to an existing Account and/or Contact, add the existing record(s) under the "Related To" section.

  1. Click Save.
    This record will sync with your Payment Gateway and the Customer ID and Created In Gateway fields will auto-populate.

Option 2

  1. Add the Account’s billing and shipping addresses.
    H_01_08_Option 2_1

  2. Create and set a Contact to be the Primary Stripe Contact.
    H_01_08_Option 2_2

  3. On the Account click the Create Stripe Customer button.
    H_01_08_Option 2_3

  4. Confirm that a Payment Gateway Customer was created and related to the Account.
    H_01_08_Option 2_4

Option 3

  1. Add the Push To Gateway button to your Payment Gateway Customer page layout.
  2. Navigate to Custom Settings > Blackthorn Pay - Trigger Settings > Manage > Edit > Enable Disable Creating a Stripe Customer.
  3. Navigate to the Payment Gateway Customer object.
  4. Click New.
  5. Populate the Name, Payment Gateway, Email, and Description fields.
  6. Click Save.
  7. Click Push To Gateway.
  8. Click the Push button on the Visualforce page.
  9. After the success message displays and you return to the Payment Gateway Customer record, the Customer ID and Created In Gateway fields will auto-populate.
Updating a Payment Gateway Customer Record

Using Option 3 without performing Step 2 will also work if the initial trigger action never happened or if you are updating the Payment Gateway Customer record and you notice that the update did not make it to the Payment Gateway.

Remove a Payment Gateway Customer

Once a Payment Gateway Customer record in Salesforce has synced to the Stripe Payment Gateway, you are unable to delete the record. If you need to remove a Payment Gateway Customer for any reason, that can be done by clicking the Remove From Gateway button or checking the Remove From Gateway checkbox. This functionality was created so historical information can be kept while ceasing all ways to capture transactions.

  1. Navigate to the Payment Gateway Customer's object.

Lightning: Click on the app launcher > Under "All Items" > Click on Payment Gateway Customers.

Classic: Click on "All Tabs" ("+" icon in the top right) > Click on Payment Gateway Customers.

Related List on your Account or Contact page layout.

  • Click on the record you want to remove from Stripe.
  • Click Remove From Gateway button or check the Remove From Gateway field.
    Clicking this button will invalidate any related Payment Method's on file.
  • The Deleted From Payment Gateway field will be checked, letting you know this Payment Gateway Customer is no longer valid.

Notes
If the Payment Gateway Customer had any related Transactions that were captured, those records will still be in the Stripe Payment Gateway and the Customer account will show an alert, "This customer account has been permanently closed".

If you have any "Open" Transactions that are set to Auto-Process and related to this Payment Gateway Customer record, they will fail. Verify all related "Open" Transactions have been deleted once you click the Remove From Gateway button.

Troubleshooting

If you have received an error with your Payment Gateway Customer or have a question, please view our Troubleshooting page..