> For the complete documentation index, see [llms.txt](https://docs.pgecom.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pgecom.com/api-endpoint/payment/mon-cash/verifymoncashpayment.md).

# VerifyMonCashPayment

## Retrieve a order by orderId

<mark style="color:blue;">`GET`</mark> `https://sandbox.pgecom.com/api/order/{orderId}`

#### Headers

| Name                                            | Type   | Description    |
| ----------------------------------------------- | ------ | -------------- |
| authorization<mark style="color:red;">\*</mark> | String | Bearer `token` |

{% tabs %}
{% tab title="200: OK Success" %}

```json
{
    "quantity": 1,
    "receiver": "info@pgecom.com",
    "metadata": {
        "isChatEnabled": true,
        "pgPayMerchantName": "PGecom",
        "isProd": false,
        "customerEmail": "info@pgecom.com",
        "customerFirstName": "Esterling",
        "customerLastName": "Accime",
        "returnUrl": "https://sandbox.pgecom.com/payment/pgpay/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJvcmRlcklkIjoiYjU5YTA5MzktYzgyNC00NzMyLThiMmYtMzZmNDE3NDM3ZTJhIiwiaWF0IjoxNzA0MTQyNDE3LCJleHAiOjE3MDQxNDYwMTd9.JB3oVi3nH0Yw_Q9F1x-1N8bBTkJkRAjoKYq_xIfH7x0?merchantName=PGecom&amount=25"
    },
    "orderId": "b59a0939-c824-4732-8b2f-36f417437e2a",
    "successUrl": "https://sandbox.pgecom.com/payment-success",
    "status": "pending",
    "createdAt": "2024-01-01T20:53:37.155Z",
    "transactionType": "pgpay",
    "sender": "info@pgecom.com",
    "errorUrl": "https://sandbox.pgecom.com/payment-error",
    "paymentStatus": "pending",
    "updatedAt": "2024-01-01T20:53:37.155Z",
    "userID": "5f56dfa3-a415-4818-8275-44fc63ece3fd",
    "amount": 25,
    "paymentMethod": "pgpay",
    "id": "b59a0939-c824-4732-8b2f-36f417437e2a",
    "deliveryMethod": "instant",
    "customerId": "87ee04dd-41e8-42e8-b5b9-16c0e4a04c17",
    "customer": {
        "lastName": "Accime",
        "userID": "5f56dfa3-a415-4818-8275-44fc63ece3fd",
        "updatedAt": "2023-09-29T07:01:11Z",
        "createdAt": "2023-09-29T07:01:11Z",
        "id": "87ee04dd-41e8-42e8-b5b9-16c0e4a04c17",
        "email": "info@pgecom.com",
        "phone": "+1 404 825 3444",
        "firstName": "Esterling"
    },
    "shop": {},
    "invoice": {},
    "products": []
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized" %}

```javascript
{
    "message": "jwt malformed - session expired",
    "status": 401
}
```

{% endtab %}

{% tab title="400: Bad Request Bad request" %}

```javascript
{
    "message": "Order with id 1ddbb939-a8e9-4c31-85d-1cc5477574a9 not found",
    "status": 400
}
```

{% endtab %}
{% endtabs %}

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

```javascript
const axios = require('axios');

let config = {
  method: 'get',
  url: 'https://sandbox.pgecom.com/api/order/b59a0939-c824-4732-8b2f-36f417437e2a',
  headers: { }
};

axios(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

{% endtab %}

{% tab title="Python" %}

```ruby
require "uri"
require "net/http"

url = URI("https://sandbox.pgecom.com/api/order/b59a0939-c824-4732-8b2f-36f417437e2a")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body

```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require "uri"
require "net/http"

url = URI("https://sandbox.pgecom.com/api/order/b59a0939-c824-4732-8b2f-36f417437e2a")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body

```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.pgecom.com/api/order/b59a0939-c824-4732-8b2f-36f417437e2a');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
```

{% endtab %}

{% tab title="Curl" %}

```sh
curl --location 'https://sandbox.pgecom.com/api/order/b59a0939-c824-4732-8b2f-36f417437e2a'
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.pgecom.com/api-endpoint/payment/mon-cash/verifymoncashpayment.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
