Payment Intents and Stripe Payment Methods

Prev Next

Prerequisites

To use this feature, you must meet the following criteria:

  • Use on iOS mobile device and a Stripe payment gateway.
  • Have Version 2.0.2 of the Mobile Payments app and Version 6.42 of the Payments package.

Overview

What is a Payment Intent record? A Payment Intent record is used by Stripe for its Strong Customer Authentication (SCA) feature, which helps make the payment process more secure.

Purpose of Feature Update: To change how Payment Intents are confirmed by the Mobile Payments app.

Previous Functionality

The Mobile Payments app confirmed the Payment Intent before making any calls to Salesforce to capture the Payment Intent.

Once the Payment Intent was confirmed, additional updates could no longer be made. That meant, all metadata mapping or customer information needed to be added to the Payment Intent before it was confirmed. But, the details required are located in Salesforce.

New Functionality

The Mobile Payments app now confirms the Payment Intent record is updated with any required metadata mapping and customer info before Stripe captures the Payment Intent. The streamlined process also reduces the number of API calls made to Stripe.

How It Works

New Custom Settings

The Blackthorn Payments | Mobile Settings custom setting includes the Confirm Payment Intents (bt_stripe__Confirm_Payment_Intents__c) field, which allows you to change where in the process the Payment Intent will be confirmed.

  • To use the new setting and postpone the initial confirmation of intent until additional information is gathered, set Confirm Payment Intents to “False.”
  • To revert to the out-of-the-box behavior of immediate intent confirmation, set Confirm Payment Intents to “True” or leave the field blank.

New Order of Operation: The Mobile Payments app creates the Payment Intent and updates it with any required metadata mapping and customer information before Stripe receives it.

Enter Payment Methods Manually

Previously, Stripe only supported creating Payment Intents with the Mobile Payments app if the card information was captured by a card reader (versus typing the card numbers manually).

Now, the following solution applies when manually typing in a card’s information.

Since the payload going to Stripe includes a Payment Method ID but no Payment Intent ID (which was not created because the card info was typed in), the Stripe payment intents API will create the new Payment Intent record. This passes the following information to Stripe: Payment Method, customer information, and whether the customer has given consent to save the Payment Method by checking the box in the Mobile Payments app.

After completing the transaction, the result is newly created Transaction and Payment Method records linked to the customer in Stripe and Salesforce. If the customer checks the box to allow their Payment Method to be reused, it will also be saved for future use.

Using a Card Reader

After using a card reader to complete a Transaction on the Mobile Payments app, a reference to the Payment Method record will be stored with the captured Payment Intent in Salesforce and Stripe.

Additional Configurations

When the Mobile Payments app and a card reader are used to complete a payment, and the following custom settings are selected, the Payment Intent's information will be updated before an attempt to confirm/capture it.

  • Blackthorn Payments | Mobile Settings Confirm Payment Intents field is not checked.
  • Blackthorn Pay - Trigger Settings Enable SCA field is checked.

Scenario 1: If an Account or Contact record is not selected, a new Payment Gateway Customer (PGC) will be generated for each Transaction.

Use the Mobile Payments app and card reader to complete a payment when an existing Account and/or Contact is not selected.

The captured payment in the Stripe account will include the customer ID and the charge/transaction ID.

Stripe will share a message indicating that the Payment Method was set up for future or scheduled payments. The pm_id was also set up for future use.

Comparing the values from Stripe with those on the Salesforce Transaction record will show that the Customer ID, Payment Method ID, and Transaction ID match the values in Stripe.

The Transaction’s related Payment Intent, Customer, and Payment Method records will be complete and include the IDs from Stripe.

The new Payment Method can now be used to complete a new Transaction, which will generate a new Payment Gateway Customer record.

Scenario 2: If a Contact and/or Account records are selected, a new Payment Gateway Customer (PGC) will be created, if required, and used for subsequent Transactions.

Use the Mobile Payments app and card reader to complete a payment where an existing Account and/or Contact are selected.

The captured payment in the Stripe account will include the customer ID and the charge/transaction ID.

Stripe will share a message indicating that the Payment Method was set up for future or scheduled payments. The pm_id was also set up for future use.

Comparing the values from Stripe with those on the Salesforce Transaction record will show that the Customer ID, Payment Method ID, and Transaction ID match the values in Stripe.

The Transaction’s related Payment Intent, Customer, and Payment Method records will be complete and include the IDs from Stripe. The new Payment Method can now be used to complete a new Transaction.

Here’s where things differ from the first scenario.

Now, when a user completes a new payment using the same Contact and/or Account records, a new PGC record is not created. Instead, the PGC record from the original Transaction is used.

A new Payment Method is generated each time, but it will be linked to the first PGC record created for this specific combination of Contact and/or Account records.

Stored Offline Payment Information

Salesforce’s SmartStore is a multithreaded, secure solution for offline storage. It manages and stores payment information on mobile devices when they are offline.

When a Transaction occurs, the following information will be stored for each Payment Method type.

Cash Payments

  • Description: Transaction Description
  • Amount: Transaction Amount
  • Currency: Transaction Currency ISO
  • Method: HTTP method for API call once connection is restored
  • Path: Salesforce API endpoint to call once connection is restored
  • Timestamp: Unix timestamp when record was created
  • Gateway: Payment Gateway ID
  • Account Id: Associated Salesforce Account
  • ContactId: Associated Contact information
  • Email: Email recipient for sending the receipt

Typed Card Payments

  • Description: Transaction Description
  • Amount: Transaction Amount
  • Currency: Transaction Currency ISO
  • Method: HTTP method for API call once connection is restored
  • Path: Salesforce API endpoint to call once connection is restored
  • Timestamp: Unix timestamp when record was created
  • Idempotent UUID: Unique identifier to prevent duplicate processing
  • Gateway: Payment Gateway ID
  • Card Details
    • Name: Cardholder name
    • Email: Cardholder email address
    • Expiry: Card expiration date
    • ZIP: Billing address ZIP code
    • Card number: Card number
  • Account Id: Associated Salesforce Account
  • ContactId: Associated Contact information
  • Email: Email recipient for sending the receipt

Card Reader Payments

  • Description: Transaction Description
  • Amount: Transaction Amount
  • Currency: Transaction Currency ISO
  • Method: HTTP method for API call once connection is restored
  • Path: Salesforce API endpoint to call once connection is restored
  • Timestamp: Unix timestamp when record was created
  • Idempotent UUID: Unique identifier to prevent duplicate processing
  • Gateway: Payment Gateway ID
  • Payment Intent Id: Offline Id for the Payment Intent. The card information is managed by Stripe.
  • Account Id: Associated Salesforce Account
  • ContactId: Associated Contact information
  • Email: Email recipient for sending the receipt

ACH Payments

  • Description: Transaction Description
  • Amount: Transaction Amount
  • Currency: Transaction Currency ISO
  • Method: HTTP method for API call once connection is restored
  • Path: Salesforce API endpoint to call once connection is restored
  • Timestamp: Unix timestamp when record was created
  • Idempotent UUID: Unique identifier to prevent duplicate processing
  • Gateway: Payment Gateway ID
  • Bank Details
    • Account Holder: Name on bank account
    • Account Number: Bank account number
    • Routing Number: Bank routing/ABA number
    • Holder Type: Account holder type
  • Account Id: Associated Salesforce Account
  • ContactId: Associated Contact information
  • Email: Email recipient for sending the receipt