Community FX API
Community FX API is the pre-payment FX quoting interface between Debtor Agent (DA) banks and Gateway Intermediary (GI) banks. DA banks call this API to obtain a locked FX rate from a GI before constructing the pacs.008 payment message. The API returns rates, fees, delivery estimates, and instrument options so that DA banks can present a complete cost summary to the debtor before authorisation.
In this section you will find the technical implementation details for integrating with Community FX API as a Consumer (DA bank) or as a Provider (GI bank).
OpenAPI specification & other guides
Refer to the Community FX API Reference to help you integrate this API.
Choose Developer Tools
Consider using one of the developer tools designed to simplify integration with API-based services on the Swift platform.
- Swift SDK handles lower-level plumbing: authentication, authorisation, signing, and error handling.
- Swift Microgateway lets you configure and monitor all API calls on Swift and capture inbound API requests. GI banks implementing the Provider role should evaluate Microgateway for inbound request routing and logging.
- Swift zero-footprint provides reference implementations for building your own SDK or utilities.
Not sure which tool is right for you? Try the connectivity option selector for a recommendation.
Test Community FX API in the Sandbox
The Community FX API Sandbox returns static sample responses and does not contain application logic. Use it to:
- Verify your application generates valid requests conforming to the OpenAPI specification.
- Test the JWT-Bearer authentication flow with a self-signed certificate over the Internet.
- Confirm your application correctly parses multi-quote response arrays and paginated corridor listings.
You can view, fork or download the Postman collection which includes authentication API calls and sample Community FX API calls. Also refer to access sandbox where dedicated sandbox credentials are provided. To start testing in the sandbox, create an app and select "Community FX API".
Test in Pilot for Providers
The Pilot environment aims to test production like transactions against a real counterparty, and it is intended to fully qualify your API integration. Follow the steps below to access the Community FX API Pilot testing environment.
Step 1: Place order for testing in Pilot for Providers
Place the order for Community FX API for Providers on Swift.com. Provide your BIC and implementation date in the order details.
Step 2: Develop the API
Your technical team should complete the following:
1Set up development and UAT environments. 2Define endpoints and implement request handling conforming to the Community FX API Reference. 3Implement FX rate calculation, quote creation, TTL management, and corridor data retrieval. 4Implement response and error handling in accordance with the specification. 5Integrate with your FX pricing engine, corridor configuration, and internal systems. 6Perform testing and deployment.Endpoints your service must implement:
| Method | Paths | Your service must |
|---|---|---|
| POST | /quotes | Accept quote requests. Return one or more FxQuote objects with locked rates, fees conversion_fee, delivery estimates, and a time-to-live. Return at most 20 quotes per request when instrument_type=all. |
| GET | /quotes/{quote_id} | Return a previously issued quote by its ID. Reflect current status ( active or expired). Set ttl_seconds to 0 for expired quotes. |
| GET | /corridors | Return corridor records matching the caller's filters ( source_currency, destination_currency, destination_country, instrument_type). Support offset/ limit pagination. |
| GET | /corridors/{corridor_id} | Return a single corridor record by its unique ID. |
Key implementation requirements:
- Idempotency — If POST /quotes includes an idempotency_key (UUID v4), return the original quote(s) for duplicate requests with the same key within the quote's TTL window. Reject requests that reuse a key with different request parameters (HTTP 400, error code SwAP500).
- X-BIC routing — Every request carries an X-BIC header identifying the target GI. Your infrastructure must route requests based on this header. If the BIC is invalid or unreachable, return HTTP 400, error code SwAP522.
- Quote expiry — Transition quotes from active to expired server-side when expires_at is reached. Expired quotes must not be honoured for payment.
- Fee transparency — The conversion_fee field represents only your FX conversion fee. It does not include Swift platform fees, correspondent agent fees, or other payment infrastructure charges. The DA bank assembles the all-in cost from separate sources.
- Error responses — All errors must use the ErrorMessage schema with required fields severity Fatal or Transient, code, and text. Use Transient severity for retryable conditions (rate limits, temporary unavailability) and Fatal for permanent failures (invalid requests, missing resources).
- Charge bearer — Support DEBT (all charges borne by debtor) and SLEV (charges follow service level agreement) in the charge_type field, per ISO 20022 ChrgBr.
Step 3: Configure your API service over Swift in Pilot
Refer to Web Server Configurations for Data Providers to deploy your API service in the Pilot environment.
Confirm that your service can:
- Receive valid API requests sent from DA bank consumers.
- Return valid API responses conforming to the OpenAPI specification.
- Handle edge cases: expired quotes, unsupported corridors, duplicate idempotency keys, rate limit scenarios, and maintenance windows.
- Meet any additional test requirements agreed with your DA bank consumers.
Go Live for Providers
After successful Pilot testing with your DA bank consumers, follow these steps.
Step 1: Place order for Live for Providers
Place the order for Community FX API for Providers on Swift.com. Provide your BIC and implementation date in the order details.
Step 2: Configure your API service over Swift in Live
Refer to Web Server Configurations for Data Providers to deploy your API service in the Live environment.
Step 3: Live testing
Once the Live service is provisioned, complete additional testing with your DA bank consumers to verify expected results in the Live environment.
Test Community FX API in Pilot for Consumers
The Pilot environment tests production-like transactions against a real GI counterparty and is intended to fully qualify your integration.
Step 1: Place order for testing in Pilot for Consumers
Place the order for Community FX API for Consumenrs on Swift.com. Provide your BIC and implementation date in the order details.
Step 2: Create an app for Pilot
Create a dedicated app for the Pilot environment and select Community FX API from the list of API products. The app contains a consumer-key and consumer-secret which identify your application when calling the API. After creating the app, promote it to the Pilot environment.
Step 3: Create certificate and assign RBAC role for Pilot
Community FX API supports Business certificates and Channel certificates when signing the JWT in the authorisation API call. After creating the certificate, assign the RBAC role swift.fxcommunity.api!p to the certificate for Pilot.
This step must be done by a security officerAlliance Lite2 Customer Security Officer. Click to learn more on Swift.com..
Step 4: Make your first test API call in Pilot
You now have the credentials to access Community FX API in Pilot. Refer to Authentication for details on obtaining and using access tokens.
Pilot base URL: https://api-test.swiftnet.sipn.swift.com/swift/community-fx/v1
A recommended first test sequence:
1GET /corridors — confirm corridor coverage from the GI. 2POST /quotes with instrument_type=all — request quotes for all available instruments on a supported corridor. Include an idempotency_key (UUID v4) for safe retries. 3GET /quotes/{quote_id} — retrieve one of the returned quotes and verify status, expiry, fees, and delivery estimate. 4Retry the same POST /quotes with the same idempotency_key — confirm the GI returns the original quotes without creating duplicates. 5Wait for the quote to expire, then GET /quotes/{quote_id} again — confirm status changes to expired and ttl_seconds is 0.Agree with your GI counterparty on acceptance criteria. At minimum, your application should request quotes, retrieve them, handle expired quotes, and process error responses 400, 401, 403, 404, 429, 503, 504).
Go Live for Consumers
After successful Pilot testing, follow these steps to use Community FX API in Live.
Step 1: Place order for Live for Consumers
Place the order for Community FX API for Consumers on Swift.com.
Step 2: Create an app for Live
Promote your Pilot app to the Live environment, or create a new app and select Community FX API. After creating or promoting the app, ensure it is active in the Live environment.
You must promote the app to Pilot first, then Live.
Step 3: Create certificate and assign RBAC role for Live
Follow the same certificate creation process used for Pilot. Assign the RBAC role swift.fxcommunity.api to the certificate for Live.
This step must be done by a security officerAlliance Lite2 Customer Security Officer. Click to learn more on Swift.com..
Step 4: Make your first API call in Live
Swap Pilot credentials for Live credentials and start using Community FX API in your Live applications. Refer to Authentication for credential configuration.