---
title: "Initiate Payment"
method: POST
path: "/api/initiatePayment"
tags: ["Payment APIs"]
---

# Initiate Payment

`POST /api/initiatePayment`

Create a payment transaction for specific PSP and their supported Payment Methods. Please refer the list of supported PSPs & payment methods on PortOne.
Once you have the response, depending on the “Payment Method” attribute, you will be either redirected to the PSP hosted payment page OR results page incase of Card/ Installment methods.

## Headers

- `Content-Type` string
- `X-Portone-Client-Key` string

## Request body

- object
  - `key` string, required — The unique PortOne key for merchant
  - `merchant_order_id` string, required — The unique merchant order reference generated by the merchant
  - `pmt_channel` string, required — The Payment Channel Key listed in PortOne docs
  - `pmt_method` string, required — The Payment Method Key listed in PortOne docs
  - `description` string, required — The description of the transaction
  - `environment` 'live' | 'sandbox', required — The environment of the transaction is either live OR sandbox
  - `amount` number, double, required — The amount of transaction, can be a floating-point number
  - `currency` string, required — The currency of transaction
  - `signature_hash` string, required — The signature_hash of transaction details generated as per <a href="/docs/payment-request" target="_blank">Payment Request Signature Documentation</a>
  - `billing_details` BillingDetails — The JSON object for billing details
    - `billing_name` string — The billing first and middle name
    - `billing_surname` string — The billing last name
    - `billing_email` string — The billing email address
    - `billing_phone` string — The billing phone number
    - `billing_address` Address — The JSON object containing full address
      - `city` string — City name
      - `country_code` string — 2 digit country code
      - `country_name` string — Full country name
      - `locale` string — region locale
      - `line_1` string — Line 1 of the address
      - `line_2` string — Line 2 of the address
      - `postal_code` string — Postal code of the area
      - `state` string — State of the address
  - `shipping_details` ShippingDetails — The JSON object for shipping details
    - `shipping_name` string — The shipping first and middle name
    - `shipping_surname` string — The shipping last name
    - `shipping_email` string — The shipping email address
    - `shipping_phone` string — The shipping phone number
    - `shipping_address` Address — The JSON object containing full address
      - `city` string — City name
      - `country_code` string — 2 digit country code
      - `country_name` string — Full country name
      - `locale` string — region locale
      - `line_1` string — Line 1 of the address
      - `line_2` string — Line 2 of the address
      - `postal_code` string — Postal code of the area
      - `state` string — State of the address
  - `token_params` TokenParams — The JSON object for initiating transaction using card details
    - `token` string — Token generated by payment gateway
    - `partial_card_number` string — Partial card number used for identification purposes
    - `expiry_month` string — Expiration month of the card
    - `expiry_year` string — Expiration year of the card
    - `type` string — Type of card (e.g. Visa, Mastercard)
    - `save_card` boolean — Whether to save the card for future use
    - `is_channel_token` boolean — Whether the token is a channel token. Default is false. Used for non-seamless card transactions.
  - `order_details` object[] — The JSON array for order details
    - `id` string — The unique identifier of the order-item
    - `name` string — The name of the product
    - `price` number, double — The unit price of the product
    - `quantity` integer — The quantity of the product
    - `image` string — The URL of the product image
    - `additional_details` object — Additional details about the order
  - `success_url` string, required — The url of success page hosted by merchant.
  - `failure_url` string, required — The url of failure page hosted by merchant.
  - `pending_url` string — The url of pending page hosted by merchant.
  - `routing_enabled` boolean — Boolean flag to identify if routing is enabled
  - `routing_params` RoutingParams — The JSON object for adding routing details, only applicable in routing enabled is set to true
    - `type` string — The type of routing
    - `routing_ref` string — The route ID that is created from Admin Dashboard
    - `data` object[] — This is required if you have not created a routing ID from dashboard
      - `channel_key` string — The channel key
      - `method_key` string — The method key
      - `rank` integer — The rank of this routing option
  - `transaction_type` 'PREAUTH' | 'PURCHASE' — The type of the transaction to capture
  - `user_configured_field1` string — Custom user configured field 1
  - `user_configured_field2` string — Custom user configuration field 2
  - `user_configured_field3` string — Custom user configuration field 3
  - `user_configured_field4` string — Custom user configuration field 4
  - `user_configured_field5` string — Custom user configuration field 5

## Response `200`

Successful response

- object
  - `is_success` boolean — The boolean flag denoting if payment link/charge was successfully created
  - `redirect_url` string — The unique PortOne key for merchant
  - `channel_order_ref` string — The unique Order reference generated by PSP for transaction.
  - `merchant_order_ref` string — The unique Order reference generated by merchant for transaction.
  - `order_ref` string — The unique Order reference generated by PortOne for transaction.
  - `message` string — The extra message about the transaction
  - `deep_link` string — The deep-link for transaction to use in mobile
  - `additional_data` object — The additional metadata of transaction
  - `qrcode_url` string — The QR Code Image URL which merchant can use to scan and complete the transaction
  - `expiry_in_minutes` string — The expiration time in minutes for the QRCode based transaction

## Other responses

- `401` — Failure response

---

[API](https://skmtc.net/portone/apis/payment-apis.md) · [All operations](https://skmtc.net/portone/apis/payment-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/portone/payment-apis/revisions/f3ccea652555/schema)
