Partner API
  1. Currency Exchange
Partner API
  • Getting Started
    • Introduction
    • Authentication
    • Business Use Cases
  • API References
    • Partner Operations
      • Get Balances
      • Get Transaction History
      • Retrieve Exchange Rate and Create a Lock
      • Create and Finalize an Exchange
      • Create Crypto Withdrawal
      • Create a SEPA Transfer
      • Get SEPA Transfer Details
    • User Accounts with KYC
      • Create User Account and Generate Balances
      • Add KYC File
      • Add POA File
      • Add User Verification
      • Update Existing User
      • Delete User
      • Suspend User
      • Unsuspend User
      • Get User Balances
      • Get User Transaction History
    • User Accounts without KYC
      • Create User Account and Generate Balances Without KYC
      • Update Existing User
      • Delete User
      • Suspend User
      • Unsuspend User
      • Get User Balances
      • Get User Transaction History
    • KYC by P100
      • Creating KYC Verification
      • Redirect to Verification
      • Get KYC Status
    • Currency Exchange
      • Retrieve Exchange Rate
        GET
      • Retrieve Exchange Rate and Create a Lock
        GET
      • Create and Finalize an Exchange
        POST
      • Retrieve Detailed Exchange Infromation
        GET
    • Crypto Deposits
      • Update Travel Rule
    • Crypto Withdrawals
      • Get Network Fee
      • Create Crypto Withdrawal
      • Get Crypto Withdrawal Details
    • Internal Transfers
      • Create a Transfer
      • Get Transfer Details
    • Virtual Cards
      • Create Virtual Card
      • Get All User Cards
      • Get Card Details
      • Update Card PIN
      • Block Card
      • Unblock Card
      • Get Card Limits
      • Update Card Limits
      • Delete Card
    • Custom Fiat Operations
      • SEPA Deposit & Withdrawal
  • Integration
    • SDKs & Integration Guides
    • Transaction Processing
    • Error Handling
    • Rate Limiting
    • Webhooks
      • User & KYC Webhooks
        • User Balance Generation
        • KYC File Added
        • POA Verification Status
        • KYC Verification Status
      • Transfers & Payments Webhooks
        • P2P Transfer Webhook
        • SEPA Transfer
        • SEPA Deposit
        • Crypto Withdrawal
        • Crypto Deposit
        • Exchange
        • Card Transaction
      • Card Webhooks
        • Card 3DS Code
        • Card Activation Code
  • Reference
    • Supported Countries
    • Supported Currencies
    • Fees
    • FAQ
    • Changelog
    • Support
  1. Currency Exchange

Create and Finalize an Exchange

Testing Env
https://partner-api-stage.p100.io
Testing Env
https://partner-api-stage.p100.io
POST
/v1/exchange
This endpoint executes a currency exchange for a user, converting a specified amount from one supported currency to another (e.g., BTC to EUR). You must provide a valid rate lock ID (from the 'Retrieve Exchange Rate and Create a Lock' endpoint) to guarantee the exchange rate. The request requires the user's external ID, amount, source and target currencies, and the lock ID. The system reserves the user's funds and associates the transaction with the locked rate. The response returns an exchange ID immediately, while the actual processing (including balance checks and compliance) occurs asynchronously. Use the exchange details endpoint to check the final status and any errors.
Business logic errors (such as insufficient funds) are not checked at this stage. Processing occurs asynchronously. Use the Get Transfer Details endpoint to verify the final status and any errors.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://partner-api-stage.p100.io/v1/exchange' \
--header 'Content-Type: application/json' \
--header 'x-api-key;' \
--data-raw '{
  "sourceExternalUserId": "75a1d530-3c12-44e8-a23a-0241b9e73c87",
  "amount": 1,
  "currencyFrom": "eur",
  "currencyTo": "eth",
  "lockId": "e850ae7b-b416-4991-a8e1-1811e6c77e18"
}'
Response Response Example
201 - Success
{
    "exchangeId": "3f0aeaa7-1177-4d77-9985-0cb987809801"
}

Request

Authorization
API Key
Add parameter in header
x-api-key
Example:
x-api-key: ********************
or
Body Params application/json

Examples

Responses

🟢201Created
application/json
Body

🟠401Access Denied
🟠400P403: Validation error
🟠400P412: User not exist
🟠400P432: Invalid Exchange Lock
🟠400P457: Currencies cannot be the same
🟠400P500: Unknown exception
🟠400P501: Service temporarily unavailable
Previous
Retrieve Exchange Rate and Create a Lock
Next
Retrieve Detailed Exchange Infromation
Built with