> For the complete documentation index, see [llms.txt](https://aliniex.gitbook.io/alix-pay/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aliniex.gitbook.io/alix-pay/api-reference/on-off-ramp-api/off-ramp/get-off-ramp-order-detail.md).

# Get off-ramp order detail

This endpoint is used to retrieve detailed information about an off-ramp order based on the specified order\_id. The details include the transaction amount, payment method, status, and cryptocurrency purchased.

**API end-point**

<mark style="color:green;">`POST`</mark> `/api/v2/orders/details`

**Headers**

| Name         | Value                                                                                    |    |               |
| ------------ | ---------------------------------------------------------------------------------------- | -- | ------------- |
| Content-Type | `application/json`                                                                       |    |               |
| lang         | <p>The default will en if this param has been empty. </p><p>Supported languages:<code>en | cn | vi</code></p> |

**Request Body**

<table><thead><tr><th width="192">Name</th><th width="178">Type</th><th>Condition</th><th>Description</th></tr></thead><tbody><tr><td>partnerCode</td><td>string</td><td>required</td><td>Code of of the partner</td></tr><tr><td>signature</td><td>string</td><td>required</td><td><ul><li>The signature created with  SHA256 by using RSA created private key of partner</li><li>The <strong>public key</strong> that has been provided to you during onboarding.</li><li>The data shall be signed according to the structure: <strong><code>partnerCode|externalOrderId|secretKey</code></strong></li></ul></td></tr><tr><td>externalOrderId</td><td>string</td><td>required</td><td>This <strong>unique id</strong> for order created and managed in partner side. It will keep the update for transaction status after created it</td></tr></tbody></table>

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "externalOrderId": "string",
  "type": "string",
  "fiatAmount": 0,
  "paidAmount": 0,
  "tokenTransfer": {
    "currency": "string",
    "network": "string",
    "price": 0,
    "amount": 0,
    "walletAddress": "string",
    "txHash": "string"
  },
  "bankTransfer": {
    "bankAccountName": "string",
    "bankAccountNumber": "string",
    "bankName": "string",
    "contentPayment": "string",
    "totalPayment": 0,
    "qrUrl": "string"
  },
  "fees": {
    "systemFee": 0,
    "processingFee": 0
  },
  "status": "string", // AWAITING_PAYMENT | PAYMENT_COMPLETED | PROCESSING_TOKEN_TRANSFER | SUCCESS | ERROR 
  "description": "string",
  "createdAt": "string",
  "expiresAt": "string",
  "signature": "string"
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "Invalid request"
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
**Signature**&#x20;

* Partner will digitally sign the transmitted data using **`SHA256`** with RSA algorithm
* The **private key** that has been of yours
* Data shall be signed according to the structure **`externalOrderId|type|fiatAmount|status|secretKey`**
  {% endhint %}

### How to create and verify the signature  <a href="#how-to-do-signature-creation-verification" id="how-to-do-signature-creation-verification"></a>

#### 1. Creation

```typescript
import * as crypto from 'crypto';

function create(data: string, privateKey: string): string 
{
  const signer = crypto.createSign('RSA-SHA256');
  signer.update(data);
  signer.end();

  return signer.sign(privateKey, 'base64');
}
```

#### 2. Verification

```typescript

function verify (data: string, signature: string, pubKey: string): boolean
{
        const verify = createVerify('RSA-SHA256');
        verify.update(data);
        verify.end();
        return verify.verify(pubKey, signature, 'base64');
}
```

**Transaction status**

Please refer the [order status](/alix-pay/resources/order-status.md)

| Status name                 | Description                                                                                                                               |
| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| AWAITING\_PAYMENT           | <p>The order created successfully. It is waiting <br><mark style="color:red;">(please wait IPN or manual check with operation)</mark></p> |
| PAYMENT\_COMPLETED          | When payment has transferred from AliX Pay to your customer bank account                                                                  |
| PROCESSING\_TOKEN\_TRANSFER | When the token has deducted from your account wallet on AliX Pay                                                                          |
| SUCCESS                     | When an transaction has completed                                                                                                         |
| ERROR                       | When an transaction has error with any reasons                                                                                            |
