Integrating a Payment Gateway Package

Configure Salesforce Billing and your payment gateway package to communicate with an external payment gateway.

  • Configure Payment Gateways in Salesforce

    Install a payment gateway package and configure your payment gateway entities to communicate with your payment gateway provider.

  • Salesforce Billing Payment Gateway Interfaces

    A payment gateway package requires three interfaces to communicate with Salesforce Billing. Each interface contains methods that the user-defined PaymentGatewayAPI class implements to process different types of transaction actions.

  • Configuring Salesforce Billing to Access Your PaymentGatewayAPI Class

    To integrate with a payment gateway package, Salesforce Billing must know which gateway package class contains the methods required to process a payment request and convert the results to data that Salesforce Billing can read. The Salesforce Billing custom setting Payment Gateway Config defines the class that Salesforce Billing calls from the gateway package. You must also add code that installs a record of the class in PaymentGatewayConfig.

  • Mapping Gateway Response Codes to Salesforce Billing Gateway Statuses

    Payment gateways have many response codes for payment operations. Salesforce Billing categorizes these codes into one of seven Gateway Status field values on your payment transaction record. The gateway status lets you know the result of a gateway call and whether you must correct anything. When you configure a payment gateway package, create metadata that maps your chosen gateway’s response codes to one of the statuses.

  • Capture Externally Authorized Payments

    Authorize payments in an external system, then capture the payment in Salesforce Billing using our Capture Transaction API methods. You can then use Salesforce Billing to manage the payment lifecycle and settle invoices.

  • Merchant Credential Fields

    Each payment gateway package installs merchant credential fields on the Salesforce Billing payment gateway object. You can use these fields to provide merchant information when making a transaction request to the payment gateway.

  • Required Gateway Classes

    All payment gateway and payment method records require several fields to communicate with the payment gateway, regardless of the gateway type. Specific gateway types may also require additional fields.

  • Payment Method Handling for Guest Users

    The Billing package automatically creates PaymentMethod objects when processing payments from guest users through the Lightning Platform Payment site.

  • Configure a Payment Gateway in Salesforce Billing

    Configure Salesforce Billing to send data to your chosen payment gateway.