Salesforce Billing Global Payment API

Salesforce Billing exposes payment transactions as global API. When you’re working with our transaction API in your payment gateway, review important guidelines.

Salesforce Billing acts as a pass-through layer for transactions. It routes the processing of input parameters to a payment gateway package and then returns the result of the transaction to the API caller.

Salesforce Billing doesn’t perform any implicit operations as a result of calling the transaction API. Our global methods provide only a layer to interact with a payment gateway to process a payment transaction. For example, calling the chargeTransaction global API on its own doesn’t create a payment transaction object or a payment object.

All global methods in the blng namespace use the following input parameter structure.

Input - Map<String, TransactionParameter> mapOfTransactionParameterById

The map represents a unique string, such as an invoice number. The value is an instance of the TransactionParameter class, which contains the information needed to build a payment request.

All global methods in the blng namespace use the following output parameter structure.

Output - List<TransactionResult>

When a payment gateway sends a response following a transaction request, your payment gateway package evaluates the response and stores the information in the TransactionResult class.

Salesforce Billing global payment API includes the following methods.

API Method NameDescription
generateTokenGenerates a token for a given input.
authorizeTransactionAuthorizes a transaction.
captureTransactionCaptures an unauthorized transaction.
voidRefundTransactionVoids a refund transaction.
chargeTransactionCharges a transaction.
voidTransactionVoids a payment transaction (charge or capture).
refundTransactionRefunds a payment transaction for a payment that was made previously in the same gateway.
voidTokenTransactionVoids a token.
getPaymentStatusIdentifies the status of a payment transaction.
getRefundStatusIdentifies the status of a refund transaction.
nonReferredRefundPerforms a nonreference refund.
  • Sending Transaction Information with TransactionParameter

    The transaction parameter class represents a list of transaction field values that Salesforce Billing sends to the payment gateway package. You can set the class’s attributes through Salesforce Billing global API, the Payment Center, or a payment run.

  • Mapping Gateway Responses to Payment Transactions with TransactionResult

    The TransactionResult class contains a list of information that the payment gateway sends in response to a transaction request. For charge transactions, your payment gateway package evaluates this information and maps it to a Payment Transaction record in Salesforce Billing.