Migration Guide: V1 to V2

Migrate from v1 to v2

This guide covers the breaking changes and new features when upgrading from CoinVoyage API v1 to v2.

If you're using the CoinVoyage Paykit SDK, update to the latest version which handles V2 automatically.

npm i @coin-voyage/paykit@2 @tanstack/react-query@^5.90.6

Overview of Changes

Description
V1
V2

Base URL

https://api.coinvoyage.io/

https://api.coinvoyage.io/v2/

List Orders Endpoint

-

GET /pay-orders

Process Endpoint

Available (deprecated)

Removed

Response Structure changes

Flat fields

Nested payment & fulfillment objects


Changes

1. Removed Endpoint: /pay-orders/{payorder_id}/process

The deprecated process endpoint has been removed in V2. Payment processing now happens automatically when funds are detected in the deposit address.


2. Response Structure Changes

PayOrderResponse

Many top-level fields have been moved into nested objects. The old fields are still present for backwards compatibility but deprecated.

V1 Response (flat structure):

V2 Response (nested structure):

Migration Path

V1 Field
V2 Field

source_currency

payment.src (with currency details)

source_amount

payment.src.total

destination_currency

payment.dst (with currency details)

destination_amount

payment.dst.currency_amount

deposit_address

payment.deposit_address

receiving_address

payment.receiving_address

refund_address

payment.refund_address

expires_at

payment.expires_at


3. Amount Fields Use String for BigInt

To prevent precision loss with large numbers, raw amounts are now returned as strings.

V1:

V2:

Update your code to parse raw_amount as a string/BigInt instead of a number.


4. Quote Response Changes

The quote endpoint now returns more detailed fee breakdowns.

V1 Quote Response:

V2 Quote Response:


New Features in V2

1. List Pay Orders

New endpoint to retrieve all pay orders for your organization.

Query Parameters:

  • limit - Number of results (default: 20)

  • offset - Pagination offset

  • status - Filter by status

Response:


2. Quote Breakdown Transparency

V2 exposes quote breakdown information directly in responses:

  • payment.src.base - Base quote in source currency

  • payment.src.fee - Breakdown of fees in source currency

  • payment.src.gas - Gas costs for the transaction

  • payment.src.total - Sum of above



3. Multi-Provider Execution Tracking

V2 supports tracking execution across multiple providers:


Deprecated Fields

The following fields are deprecated in V2 and will be removed in a future version. Migrate to the new field locations:

Deprecated Field
Use Instead

source_currency

payment.src

source_amount

payment.src.total

destination_currency

payment.dst

destination_amount

payment.dst.currency_amount

deposit_address (root)

payment.deposit_address

receiving_address (root)

payment.receiving_address

refund_address (root)

payment.refund_address

expires_at (root)

payment.expires_at


Need Help?

  • Check the API Reference for complete V2 documentation

  • Contact Support for migration assistance

  • Review FAQs for common questions