# Create Order (V1) Payment Page

**Endpoint:** `/api/create`\
**Method:** `POST`

#### Headers

* `appkey`: Provided by Redision
* `appid`: Application ID
* `bodysign`: Signature generated using HMAC SHA-256

#### Request Body Parameters

| Name                      | Type   | Required    | Description                                       |
| ------------------------- | ------ | ----------- | ------------------------------------------------- |
| `redirect_url`            | String | Optional    | URL to redirect user back to merchant page        |
| `redirect_target`         | String | Optional    | Default is `_top`                                 |
| `user_id`                 | String | Mandatory   | Unique ID for the user (max 50 characters)        |
| `user_mdn`                | String | Optional    | User's phone number                               |
| `merchant_transaction_id` | String | Mandatory   | Unique ID for the transaction (max 36 characters) |
| `payment_method`          | String | Mandatory   | Refer to supported payment methods                |
| `currency`                | String | Optional    | Default is `IDR`                                  |
| `amount`                  | Number | Mandatory   | Transaction amount (e.g., 10000)                  |
| `item_id`                 | String | Optional    | Item identifier (for fixed denominations)         |
| `item_name`               | String | Mandatory   | Display name for the item (max 25 characters)     |
| `customer_name`           | String | Conditional | Name of customer                                  |
| `notification_url`        | String | Optional    | URL for callback notification                     |

#### Request Body

```json
{
  "redirect_url": "https://merchant.com/return",
  "user_id": "20250209P07V2C3477000000",
  "user_mdn": "085710039744",
  "merchant_transaction_id": "TESTXSH0000011",
  "payment_method": "indosat_airtime",
  "currency": "IDR",
  "amount": 10000,
  "item_id": "3322",
  "item_name": "PAYMENT",
  "notification_url": "https://merchant.com/callback"
}
```

#### Response Parameter

| `token`          | String | Conditional | Used to redirect to the payment page                        |
| ---------------- | ------ | ----------- | ----------------------------------------------------------- |
| `expired_date`   | String | Conditional | Expiry date for virtual account or ewallet                  |
| `transaction_id` | String | Optional    | Transaction ID from Redpay                                  |
| `va`             | String | Conditional | Virtual account number                                      |
| `qrString`       | String | Conditional | String to generate qr image                                 |
| `qrisUrl`        | String | Conditional | Link to display qr image                                    |
| `phone_number`   | String | Optional    | User's phone number                                         |
| `keyword`        | String | Conditional | Keywords for reply SMS for Telkomsel DCB method             |
| `sms_code`       | String | Conditional | Code for reply SMS for Telkomsel DCB method (after keyword) |
| `short_code`     | String | Conditional | SMS sender number for Telkomsel and XL                      |
| `back_url`       | String | Optional    | Return url from ewallet payment page                        |

#### Response (Success)

```json
{
  "success": true,
  "retcode": "0000",
  "message": "Successful",
  "data": {
    "token": "56f2c280891e40257c8b4577"
  }
}
```

#### Redirect User

After successful order creation, redirect the user to:

```
{baseurl}/api/order/{appid}/{token}
```


---

# 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://redpay.gitbook.io/redpay-docs/api-reference/create-order-v1-payment-page.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.
