---
schema_version: "1"
id: a80f627f43fa54f00b81557fc3e3d31b1b306719bfda4c52827e4de92cfd9a1d
title: Payment Gateway Adapters
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexcode/apex_commercepayments_adapter_intro.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_commercepayments_adapter_intro.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: a84b8b9d0c5d2311695e7fecf7ebfe36e9918b827f7354a30a92063b9f0cd67c
description: Payment gateway adapters represent the bridge between your payments platform in Salesforce and an external payment gateway.
---
# Payment Gateway Adapters

Payment gateway adapters represent the bridge between your payments platform in Salesforce and an external payment gateway.

- **[Building a Synchronous Gateway Adapter](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_commercepayments_sync_adapter_concept.htm)**  
    In synchronous payment configurations, the Salesforce payment platform sends transaction information to the gateway, and then waits for a gateway response that contains the final transaction status. Salesforce creates a transaction only if the transaction is successful in the gateway.
- **[Set Up a Synchronous Payment Gateway Adapter](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_commercepayments_sync_adapter_setup.htm)**  
    For payments transactions, you can configure Salesforce to interface with a synchronous payment gateway adapter.
- **[Building an Asynchronous Gateway Adapter](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_commercepayments_async_adapter_concept.htm)**  
    In an asynchronous payments configuration, the payments platform first sends transaction information to the gateway. The gateway responds with an acknowledgment that it received the transaction, and then the platform creates a pending transaction. The gateway sends a notification, which contains the final transaction status. The platform then updates the transaction’s status accordingly.
- **[Set Up an Asynchronous Payment Gateway Adapter](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_commercepayments_async_adapter_setup.htm)**  
    For payments transactions, you can configure Salesforce to interface with an asynchronous payment gateway adapter.
- **[Builder Examples for Payment Gateway Adapters](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_commercepayments_builder_examples.htm)**  
    The final sections of a payment gateway adapter should define how the adapter creates requests and responses. The implementation of these classes can vary widely based on your gateway and platform requirements. We’ve provided several generics examples for review.