> For the complete documentation index, see [llms.txt](https://api-portal.novapost.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api-portal.novapost.com/changelog-1/documentation/the-method-for-obtaining-a-link-to-the-online-payment-form.md).

# The method for obtaining a link to the online payment form

| **Method name**  | The method for obtaining a link to the online payment form |
| ---------------- | ---------------------------------------------------------- |
| **Direction**    | UA-World                                                   |
| **HTTP Method**  | POST - to receive a payment link                           |
| **Route(s)**     | POST `…/mobileapp/v.1.1/payments/{number}`                 |
| **Autorization** | `Authorization: Bearer id-token…`                          |

### Description <a href="#description" id="description"></a>

The method allows the user to receive a link to an online payment form for services related to the parcel.

### Path parameters <a href="#path-parameters" id="path-parameters"></a>

| **Name** | **Type** | **Description**      |
| -------- | -------- | -------------------- |
| number   | string   | Unique parcel number |

### Request and response parameters <a href="#request-and-response-parameters" id="request-and-response-parameters"></a>

Request .../mobileapp/v.1.1/payments/{number}Response .../mobileapp/v.1.1/payments/{number}

### Sсhema <a href="#sshema" id="sshema"></a>

| **Field**  | **Type** | **Description**        |
| ---------- | -------- | ---------------------- |
| paymentUrl | string   | Unique link to payment |
| sessionId  | string   | Unique session number  |

### Acceptable HTTP status codes response <a href="#acceptable-http-status-codes-response" id="acceptable-http-status-codes-response"></a>

| **HTTP-code** | **Status**           | **Description**                                           |
| ------------- | -------------------- | --------------------------------------------------------- |
| 200           | OK                   | Request successful. The server has responded as required. |
| 422           | Unprocessable entity | ErrorMessage: "Action\_not\_available"                    |

### &#x20;Schema of connection <a href="#schema-of-connection" id="schema-of-connection"></a>

&#x20;

### Логіка розрахунку для посилок де Sender.Country = UA <a href="#logika-rozrakhunku-dlya-posilok-de-sender.country-ua" id="logika-rozrakhunku-dlya-posilok-de-sender.country-ua"></a>

1. Після отримання масиву даних з трекінг сервісу (sub-request на TS) вибираються всі operation\_type зі статусом “NeedPay”

```
"services": [
				{
					"id": null,
					"shipment_parcel_row_number": 1,
					"service_id": "115772d3-2f2e-4a03-b207-99a95f93c531",
					"service_type": "",
					"service_name": "Доставка посилок по Україні",
					"service_code": "",
					"parcel_number": "59001504113479",
					"payer_type": "Recipient",
					"payment_status": "NeedPay",
					"amount": 2,
					"price": 110,
					"discount": 16.5,
					"cost": 93.5,
					"cost_before_check": null,
					"paid": 0,
					"currency_code": "UAH",
					"additional_parameters": {
						"operation_type": "PaymentForParcel"
					}
				},
				{
					"id": null,
					"shipment_parcel_row_number": 1,
					"service_id": "a50b6f22-57c5-40bb-a015-052c21f00292",
					"service_type": "",
					"service_name": "Пакування відправлення",
					"service_code": "",
					"parcel_number": "59001504113479",
					"payer_type": "Recipient",
					"payment_status": "NeedPay",
					"amount": 1,
					"price": 30,
					"discount": 0,
					"cost": 30,
					"cost_before_check": null,
					"paid": 0,
					"currency_code": "UAH",
					"additional_parameters": {
						"operation_type": "PaymentForAdditionalServices"
					}
				},
			/*цей блок враховуватися не буде*/	
               {
					"id": null,
					"shipment_parcel_row_number": 1,
					"service_id": "3ab6e3b4-dcd7-11e8-ad0d-005056b24375",
					"service_type": "",
					"service_name": "Коробка (5 кг) з наповнювачем",
					"service_code": "",
					"parcel_number": "59001504113479",
					"payer_type": "Recipient",
					"payment_status": "",
					"amount": 1,
					"price": 0,
					"discount": 0,
					"cost": 0,
					"cost_before_check": null,
					"paid": 0,
					"currency_code": "UAH",
					"additional_parameters": null
				}
			],

```

1. operation\_type групуються (сума по **cost** складається в рамках operation\_type)
2. Формується json наступного вигляду і передається на api Nova Pay (...novapay.ua/v1/init)

```
{
	"client_first_name": "Олександра",
	"client_last_name": "Олександренко",
	"client_patronymic": "Олександрівна",
	"client_phone": "+380501231212",
	"client_email": null,
	"metadata": {
		"payer_type": "Recipient",
		"source": "mobile",
		"client_verified": "1",
		"client_npuid": "302264134C4EFD85-7AEBC02383A3048B68C3F17779416A2F6C0C2BB6",
		"ref_settlement_recipient": "db5c88ea-391c-11dd-90d9-001a92567626",
		"ref_settlement_sender": "db5c88f0-391c-11dd-90d9-001a92567626"
	},
	"delivery_metadata": {
		"ref_id": "5af75fb4-c528-11f0-92ca-48df37b91f4a",
		"express_waybill": "51212173237380",
		"medium": "parsel_machine",
		"created_at": "2025-11-19"
	},
	"recipients": [
		{
			"type": "legal",
			"amount": 105, -- сума по cost складається в рамках operation_type
			"payment_type": "PaymentForParcel", -- operation_type
			"use_hold": true, -- ознака чи буде сума заморожена
			"identifier": "31316718" -- код ЄРДПОУ на чий рахунок впадуть кошти  
		},
		{
			"type": "legal",
			"amount": 10,
			"payment_type": "PaymentForAdditionalServices",
			"use_hold": true,
			"identifier": "31316718"
		}
	]
}
```

### Список всіх можливих операцій <a href="#spisok-vsikh-mozhlivikh-operacii" id="spisok-vsikh-mozhlivikh-operacii"></a>

| **operation\_type(TS)/payment\_type** | **use\_hold** | **identifier** |
| ------------------------------------- | ------------- | -------------- |

| **operation\_type(TS)/payment\_type** | **use\_hold** | **identifier** |
| ------------------------------------- | ------------- | -------------- |
| PaymentForInternationalDelivery       | false         | `38130410`     |
| PaymentForAdditionalServices          | true          | `31316718`     |
| PaymentForServices                    | true          | `31316718`     |
| PaymentForParcel                      | true          | `31316718`     |
| PaymentForAfterPayment                | true          | `31316718`     |
| PaymentForCommissionBroker            | true          | `31316718`     |
| PaymentForCustomsPayments             | true          | `31316718`     |
| PaymentForRedirecting                 | true          | `31316718`     |
| PaymentForReturn                      | true          | `31316718`     |
| PaymentForStorage                     | true          | `31316718`     |
| PaymentForInternationalDeliveryNPU    | true          | `31316718`     |
| PaymentForLinehaul                    | true          | `31316718`     |
| MoneyTransfer                         | true          | `31316718`     |
| PaymentForAfterPayment                | true          | `31316718`     |
| InternationalDeliveryNPUVAT0          | true          | `31316718`     |
| InternationalAdditionalServices       | true          | `31316718`     |

&#x20;


---

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

```
GET https://api-portal.novapost.com/changelog-1/documentation/the-method-for-obtaining-a-link-to-the-online-payment-form.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.
