Skip to content

Expose pay_amount and pay_currency in CoinGate Order resource #19

@megham2908

Description

@megham2908

Description:
Currently, the Magento 2 plugin fetches the CoinGate Order object via the PHP SDK (Order.php
), but the pay_amount and pay_currency fields are not available on the returned Order resource.

Example reference in plugin:

$cgOrder = $client->order->get($requestId);

When calling getOrder, the API response does include both pay_amount and pay_currency (see screenshot below), but these fields are not currently exposed by the SDK resource model, making them inaccessible inside Magento.

Image

Why this matters
On the Magento Order page, merchants often need to see:

The amount paid in the customer’s chosen crypto (pay_amount)

The currency used (pay_currency)

This is particularly important for handling refunds, reconciliation, and customer communication, since the order in Magento only reflects the fiat price (e.g. 100 EUR), but not how much crypto the customer actually transferred.

Proposed solution

Update the PHP SDK Order resource (lib/Resources/Order.php to include pay_amount and pay_currency.

Once exposed, the Magento 2 plugin can store and display these values on the order detail page.

Example JSON response from API (fields missing in SDK):

{
"id": 123456789,
"order_id": "00001234",
"price_amount": "100.00",
"price_currency": "EUR",
"pay_amount": "0.001",
"pay_currency": "BTC",
"status": "paid"
}

Request
Please add support for pay_amount and pay_currency in the SDK and make them available in the Magento 2 plugin so merchants can view the exact crypto payment details on the order page.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions