# Creating a Session

## POST /custom/hpp

> Create custom payment link ---- \[auth scope:  merchant]

```json
{"openapi":"3.0.0","info":{"title":"Merchant API","version":"1.0"},"paths":{"/custom/hpp":{"post":{"operationId":"CustomHppController_createCustomHpp","summary":"Create custom payment link ---- [auth scope:  merchant]","deprecated":false,"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomHppDto"}}}},"responses":{"200":{"description":"Get Paid link created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomPaymentLinkResponse"}}}}},"tags":["custom"]}}},"components":{"schemas":{"CustomHppDto":{"type":"object","properties":{"email":{"type":"string","description":"Hpp user email."},"price":{"type":"number","description":"Hpp payment price"},"phoneNumber":{"type":"string","description":"Hpp user phone number"},"description":{"type":"string","description":"Hpp payment description"},"currency":{"type":"string","description":"Hpp payment currency"},"accountCode":{"type":"string","description":"Hpp payment accountCode"},"invoiceNumber":{"type":"string","description":"Hpp payment invoiceNumber"},"referenceName":{"type":"string","description":"Hpp payment referenceName"},"dueDate":{"format":"date-time","type":"string","description":"Hpp payment dueDate"},"subTotal":{"type":"number","description":"Hpp payment subTotal"},"taxAmount":{"type":"number","description":"Hpp payment taxAmount"},"enableTipping":{"type":"boolean","description":"Hpp payment enableTipping"},"items":{"description":"Hpp payment items","type":"array","items":{"type":"string"}},"hideTax":{"type":"boolean","description":"Hide Tax in order-summary on HPP"},"emailCustomer":{"type":"boolean","description":"Hpp payment emailCustomer"}},"required":["email","price","phoneNumber","description","currency","invoiceNumber","referenceName","dueDate","subTotal","taxAmount","enableTipping","items"]},"CustomPaymentLinkResponse":{"type":"object","properties":{"message":{"type":"string","description":"Payment link message."},"link":{"type":"string","description":"Hpp payment link."},"id":{"type":"string","description":"Get paid link unique Id"},"QRCodeImgUrl":{"type":"string","description":"Hpp payment QR COde."}},"required":["message","link","id","QRCodeImgUrl"]}}}}
```


---

# 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://docs.optty.com/hosted-payment-page/optty-direct-sessions/creating-a-session.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.
