Newer Version Available

This content describes an older version of this product. View Latest

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.

Important

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 Name Description
generateToken Generates a token for a given input.
authorizeTransaction Authorizes a transaction.
captureTransaction Captures an unauthorized transaction.
voidRefundTransaction Voids a refund transaction.
chargeTransaction Charges a transaction.
voidTransaction Voids a payment transaction (charge or capture).
refundTransaction Refunds a payment transaction for a payment that was made previously in the same gateway.
voidTokenTransaction Voids a token.
getPaymentStatus Identifies the status of a payment transaction.
getRefundStatus Identifies the status of a refund transaction.
nonReferredRefund Performs a nonreference refund.