> For the complete documentation index, see [llms.txt](https://docs.morpara.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.morpara.com/tr/en/api-documentation/entegrasyon/hostedpaymentpage.md).

# Shared Payment Page

### MorPOS Redirected Payment (Hosted Payment)

MorPOS **Hosted Payment** With the Hosted Payment model, card information is collected on MorPOS’s secure payment page.\
After the payment is initiated, the user is redirected to the payment screen provided by MorPOS.

***

#### Endpoint

```http
POST /v1/HostedPayment/HostedPaymentRedirect
```

***

### Headers

| Key            | Type   | Description                          | Example              |
| -------------- | ------ | ------------------------------------ | -------------------- |
| x-ClientID     | String | Unique identifier for the API client | your-client-id       |
| x-ClientSecret | String | Secret key for the API client        | your-secret-key      |
| x-GrantType    | String | Type of access token used            | client\_credentials  |
| x-Scope        | String | API scope                            | pf\_write, pf\_read  |
| x-Timestamp    | String | Request timestamp (ISO 8601)         | 2024-12-17T12:34:56Z |

***

### Request Body

| Field                               | Required | Type    | Description                                 | Example                                                         |
| ----------------------------------- | -------- | ------- | ------------------------------------------- | --------------------------------------------------------------- |
| merchantId                          | ✅        | String  | Unique identifier for the merchant          | 100000000000004                                                 |
| returnUrl                           | ✅        | URL     | Redirect URL after successful transaction   | [https://www.example.com/success](https://www.ornek.com/basari) |
| failUrl                             | ✅        | URL     | Redirect URL after failed transaction       | [https://www.example.com/error](https://www.ornek.com/hata)     |
| paymentMethod                       | ✅        | String  | Payment method                              | EMBEDDEDPAYMENT                                                 |
| paymentInstrumentType               | ✅        | String  | Payment instrument type                     | CARD                                                            |
| language                            | ✅        | String  | Transaction language                        | en                                                              |
| conversationId                      | ✅        | String  | Unique identifier for tracking              | MP20240305001                                                   |
| sign                                | ✅        | String  | Digital signature of the request            | ABC123...                                                       |
| transactionDetails.transactionType  | ✅        | String  | Transaction type                            | SALE                                                            |
| transactionDetails.installmentCount | ✅        | Integer | Number of installments (0 = single payment) | 0                                                               |
| transactionDetails.amount           | ✅        | Decimal | Transaction amount                          | 1.00                                                            |
| transactionDetails.currencyCode     | ✅        | Integer | Currency code (TRY = 949)                   | 949                                                             |
| transactionDetails.vftFlag          | ❌        | Boolean | VFT usage status                            | false                                                           |
| extraParameter.pFSubMerchantId      | ❌        | String  | Sub-merchant identifier                     | 12345                                                           |

***

#### Sample Request

```json
{
  "merchantId": "100000000000004",
  "returnUrl": "https://www.example.com/success",
  "failUrl": "https://www.example.com/error",
  "paymentMethod": "HOSTEDPAYMENT",
  "paymentInstrumentType": "CARD",
  "language": "en",
  "conversationId": "MSD2024030500000000123",
  "sign": "AAVWY3RZKJVVCEAD8LDQB4KWJL4QX/IQQRGQ3XIWAAG=",
  "transactionDetails": {
    "transactionType": "SALE",
    "installmentCount": 0,
    "amount": "1.00",
    "currencyCode": "949",
    "vftFlag": false
  },
  "extraParameter": {
    "pFSubMerchantId": "12345"
  }
}
```

#### Sample Response

```json
{
    "returnUrl": "https://api.morpara.com/hostedpaymentpage/SdL+XGrAcMi+Z+7brD69kMasgWJIPui/nP1CFNETmXo="
}
```

***

#### Operation Notes

* Card information **is not transmitted to the merchant system**
* The user is redirected to MorPOS’s **hosted payment page**
* Card data is processed within MorPOS infrastructure
* PCI-DSS obligation is at a minimum level
* According to the payment result, the user:
  * On successful transaction `returnUrl`
  * On failed transaction `failUrl`\
    is redirected to the address
* Hosted Payment **supports 3D Secure and non-3D Secure** scenarios
