PaymentGatewayProvider defines a payment gateway provider's configuration: its Apex adapter class, gateway type, and duplicate-call handling. It connects the provider definition to the Apex code that communicates with the payment gateway; it does not contain the adapter implementation.
The component's metadata identity, provider label, and adapter class name are separate values. Use fullName to identify the metadata component, masterLabel for its label, and apexAdapter for its Apex class reference.
Key Elements
| Element | What the Element Controls |
|---|---|
fullName |
The component's metadata identity, inherited from Metadata. It is distinct from the provider label and adapter class name. |
apexAdapter |
The Apex adapter class name for the gateway. References an ApexClass, and its value must be unique within the org. |
gatewayType |
The gateway classification. Salesforce documents Adyen, Braintree, CyberSource, Paypal, and Stripe. See the casing discrepancy below. |
idempotencySupported |
Required. Yes means the gateway ignores duplicate gateway calls; No means it processes them. |
masterLabel |
Required. The label of the payment gateway provider record. |
comments |
Additional details about the provider record, with a maximum of 1,000 characters. |
Behavior and Constraints
Access requires a Salesforce Order Management license with the PaymentPlatform org permission activated. These are prerequisites for accessing this metadata type.
Duplicate-call handling is not duplicate-record protection. Idempotency means handling a repeated call without processing it again. For this component, idempotencySupported describes whether the payment gateway ignores or processes duplicate gateway calls. Interpret repeated payment requests and retries using that distinction; Yes is not a general guarantee against duplicate business records.
Adapter selection has an org-wide uniqueness constraint. Because apexAdapter must be unique within the org, two provider definitions cannot use the same adapter class name as that field's value. The reference is a class name, not an Apex record ID or the provider's label.
masterLabel is required independently of idempotencySupported. Neither the label nor the adapter class name replaces the component's inherited fullName identity.
Deployment and Retrieval
Components are stored in the paymentGatewayProviders folder and use the paymentGatewayProvider file suffix.
The package.xml manifest supports wildcard retrieval for this type. Use PaymentGatewayProvider as the metadata type name and * as the member to request all components of this type.
Deployment configuration must account for the required masterLabel and idempotencySupported values and the org-wide uniqueness of apexAdapter. The provider component references its Apex adapter; retrieving the provider definition is not the same as retrieving the adapter's implementation.
Relationships
The provider has an outgoing reference to its Apex adapter and can receive an incoming reference from a conversation message definition. Where those references are populated, they let you trace a conversation message definition to its provider and then to the adapter class.
References
-
ApexClass:apexAdapter.
Referenced By
-
ConversationMessageDefinition:handlerName.
Documentation Inconsistencies
One gatewayType value has a casing discrepancy: Salesforce's field documentation lists CyberSource, while the exposed enumeration lists Cybersource. Do not assume these spellings are interchangeable.
Common Questions
Why can't I access PaymentGatewayProvider metadata?
Access requires both a Salesforce Order Management license and activation of the PaymentPlatform org permission.
How do I retrieve all PaymentGatewayProvider components?
Use PaymentGatewayProvider as the type name in package.xml with * as the member. The components use the paymentGatewayProviders folder and paymentGatewayProvider suffix.
Can two payment gateway providers use the same Apex adapter?
The apexAdapter value must be unique within the org, so two provider definitions cannot use the same class name in that field.
Does idempotencySupported prevent duplicate payment records?
It describes duplicate gateway-call handling, not general duplicate-record prevention. Yes means the gateway ignores duplicate calls; No means it processes them.