# API documentation

To use the payment api there are simple steps to follow.

1. Create and order using newOrder endpoint and provide callback and redirection urls
2. Save the ID and hash we provided.
3. Redirect user to the url we returned in newOrder request
4. After the payment user will be redirected to the url you provided us as returnUrl.
5. Show user the receipt.
6. You will receive a request to the statusHookUrl you provided. This message contains secret
7. Use our getStatusByHash endpoint to validate that the order has been confirmed and the amounts match
8. Return us the secret as response to the statusHook request.


---

# Agent Instructions: 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:

```
GET https://book.just.money/jmguide/justmoney-pay/api-documentation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
