openapi: 3.0.0
info:
title: Payment APIs
version: 1.0.0
servers:
- url: https://api.portone.cloud
paths:
/api/merchant/auth-token:
post:
tags:
- Payment APIs
summary: Create JWT Token
description: >
This endpoint is used to authenticate the merchant and obtain an authentication token.
Upon successful validations, the response will include the authentication token.
requestBody:
content:
application/json:
schema:
type: object
properties:
portone_key:
description: The merchant's Portone API key.
type: string
portone_secret:
description: The merchant's Portone secret key.
type: string
required:
- portone_key
- portone_secret
example:
portone_key: 'sjcrvcbVYkFobHlx'
portone_secret: '6cd264c70ec38d41a5dc2662e98c72bac58d3afc5bb4e80debbe3a976a0dc4eb'
parameters:
- name: Content-Type
in: header
schema:
type: string
example: application/json
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
content:
$ref: '#/components/schemas/AuthTokenContent'
message:
description: The description of the API request execution result
type: string
status_code:
description: The status code of API response
type: string
status_reason:
description: The status reason of API response
type: string
example: |-
{
"content": {
"expires_in": 21600,
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MjQzMjM2NTEsImlhdCI6MTcyNDMwMjA1MSwiaXNzIjoiUE9SVE9ORSIsInN1YiI6InNqY3J2Y2JWWWtGb2JIbHgifQ.-A7y_JSRNbST9wIE26xd-oq0vLsQ-PavhHyxSts0glY"
},
"message": "Auth Token generated successfully!",
"status_code": "2000",
"status_reason": "SUCCESS"
}
'400':
description: Bad Request
content:
application/json:
schema:
type: object
properties:
message:
description: The description of the API request execution result
type: string
status_code:
description: The status code of API response
type: string
status_reason:
description: The status reason of API response
type: string
examples:
example-0:
summary: Incorrect key
value: |-
{
"message": "Merchant not found for this key : sjcrvcbVYkFobHlx1",
"status_code": "4016",
"status_reason": "MERCHANT_NOT_FOUND"
}
example-1:
summary: Missing body
value: |-
{
"message": "Invalid Request, err : portone_key is a required field",
"status_code": "4001",
"status_reason": "INVALID_REQUEST"
}
/api/merchant/generate-signature:
post:
tags:
- Payment APIs
summary: Generate signature hash
description: |-
This endpoint allows you to generate a signature for a merchant transaction
The response will include the generated signature for the provided transaction details.
requestBody:
content:
application/json:
schema:
properties:
portone_key:
description: The merchant's Portone API key.
type: string
currency:
description: The currency of the transaction.
type: string
amount:
description: The amount of the transaction.
type: number
format: double
merchant_order_id:
description: The unique merchant order reference generated by the merchant.
type: string
success_url:
description: The URL to redirect to upon successful transaction.
type: string
failure_url:
description: The URL to redirect to upon failed transaction.
type: string
required:
- portone_key
- currency
- amount
- merchant_order_id
- success_url
- failure_url
type: object
example:
portone_key: 'sjcrvcbVYkFobHlx'
currency: 'THB'
amount: 111.12
merchant_order_id: 'e203767a-ae29-42dc-820f-61cbde24966e'
success_url: 'https://yourwebsite.com/success'
failure_url: 'https://yourwebsite.com/failure'
parameters:
- name: Authorization
in: header
description: The `Authorization` header is used to include the JWT for authenticating API requests; learn how to generate the token <a href="/docs/jwt-authentication" target="_blank">in this guide</a>
schema:
type: string
example: >-
Bearer
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MjQzMjM2NTEsImlhdCI6MTcyNDMwMjA1MSwiaXNzIjoiUE9SVE9ORSIsInN1YiI6InNqY3J2Y2JWWWtGb2JIbHgifQ.-A7y_JSRNbST9wIE26xd-oq0vLsQ-PavhHyxSts0glY
- name: X-Portone-Client-Key
in: header
schema:
type: string
example: sjcrvcbVYkFobHlx
- name: Content-Type
in: header
schema:
type: string
example: application/json
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
content:
$ref: '#/components/schemas/SignatureHashContent'
message:
description: The description of the API request execution result
type: string
status_code:
description: The status code of API response
type: string
status_reason:
description: The status reason of API response
type: string
example: |-
{
"content": {
"signature": "i05pcNvUjyqvaPWDI1LdrmYdN7devt3NgFu/Wg31toA="
},
"message": "Signature generated successfully!",
"status_code": "2000",
"status_reason": "SUCCESS"
}
'400':
description: Bad Request
content:
application/json:
schema:
type: object
properties:
message:
description: The description of the API request execution result
type: string
status_code:
description: The status code of API response
type: string
status_reason:
description: The status reason of API response
type: string
examples:
example-0:
summary: Invalid url
value: |-
{
"message": "Merchant not found for this key : sjcrvcbVYkFobHlx1",
"status_code": "4016",
"status_reason": "MERCHANT_NOT_FOUND"
}
example-1:
summary: Missing field in body
value: |-
{
"message": "Invalid Request, err : currency is a required field",
"status_code": "4001",
"status_reason": "INVALID_REQUEST"
}
'401':
description: Unauthorized
content:
application/json:
schema:
type: object
properties:
message:
description: The description of the API request execution result
type: string
status_code:
description: The status code of API response
type: string
status_reason:
description: The status reason of API response
type: string
example: |-
{
"message": "The JWT Token or header is invalid or expired!",
"status_code": "4054",
"status_reason": "INVALID_UNAUTHORIZED_JWT_TOKEN_ERROR"
}
/api/initiatePayment:
post:
tags:
- Payment APIs
summary: Initiate Payment
description: |-
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.
requestBody:
content:
application/json:
schema:
properties:
key:
description: The unique PortOne key for merchant
type: string
merchant_order_id:
description: The unique merchant order reference generated by the merchant
type: string
pmt_channel:
description: The Payment Channel Key listed in PortOne docs
type: string
pmt_method:
description: The Payment Method Key listed in PortOne docs
type: string
description:
description: The description of the transaction
type: string
environment:
description: The environment of the transaction is either live OR sandbox
type: string
enum: [live, sandbox]
amount:
description: The amount of transaction, can be a floating-point number
type: number
format: double
currency:
description: The currency of transaction
type: string
signature_hash:
description: The signature_hash of transaction details generated as per <a href="/docs/payment-request" target="_blank">Payment Request Signature Documentation</a>
type: string
billing_details:
$ref: '#/components/schemas/BillingDetails'
shipping_details:
$ref: '#/components/schemas/ShippingDetails'
token_params:
$ref: '#/components/schemas/TokenParams'
order_details:
$ref: '#/components/schemas/OrderDetails'
success_url:
description: The url of success page hosted by merchant.
type: string
failure_url:
description: The url of failure page hosted by merchant.
type: string
pending_url:
description: The url of pending page hosted by merchant.
type: string
routing_enabled:
description: Boolean flag to identify if routing is enabled
type: boolean
routing_params:
$ref: '#/components/schemas/RoutingParams'
transaction_type:
type: string
description: The type of the transaction to capture
enum: [PREAUTH, PURCHASE]
user_configured_field1:
description: Custom user configured field 1
type: string
user_configured_field2:
type: string
description: Custom user configuration field 2
user_configured_field3:
type: string
description: Custom user configuration field 3
user_configured_field4:
type: string
description: Custom user configuration field 4
user_configured_field5:
type: string
description: Custom user configuration field 5
required:
- key
- merchant_order_id
- pmt_channel
- pmt_method
- description
- environment
- amount
- currency
- signature_hash
- success_url
- failure_url
type: object
example:
key: 'pbmYjsswixLjpqmj'
merchant_order_id: '<Unique Merchant Order ID>'
amount: 100000
currency: 'VND'
signature_hash: '<Generated SignatureHash>'
billing_details:
billing_name: 'Billing Name'
billing_surname: Shipping Surname
billing_email: billingemail@gmail.com
billing_phone: '8959893980'
billing_address:
city: City
country_code: VN
locale: Locale
line_1: Line 1
line_2: Line 2
postal_code: '400202'
state: State
shipping_details:
shipping_name: Shipping Name
shipping_surname: Shipping Surname
shipping_email: shippingemail@gmail.com
shipping_phone: '8959893980'
shipping_address:
city: City
country_code: VN
locale: Locale
line_1: Line 1
line_2: Line 2
postal_code: '400202'
state: State
token_params:
token: 39ad3aac0486492fae11f96327ad9d97
partial_card_number: 424242******4242
expiry_month: '06'
expiry_year: '2022'
type: mastercard
save_card: true
success_url: https://checkout.portone.cloud/success.html
failure_url: https://checkout.portone.cloud/failure.html
pending_url: https://checkout.portone.cloud/pending.html
pmt_channel: MOMOPAY
pmt_method: MOMOPAY_WALLET
description: Test Example
environment: sandbox
order_details:
- id: abc
name: item1
price: 20110
quantity: 1
image: https://www.google.com
additional_details: { }
routing_enabled: true
routing_params:
type: failover
data:
- channel_key: OMISE
method_key: OMISE_CREDIT_CARD
rank: 2
- channel_key: STRIPE
method_key: STRIPE_CARD
rank: 1
transaction_type: 'PURCHASE'
user_configured_field1: SampleData1
user_configured_field2: SampleData2
user_configured_field3: SampleData3
user_configured_field4: SampleData4
user_configured_field5: SampleData5
parameters:
- name: Content-Type
in: header
schema:
type: string
example: application/json
- name: X-Portone-Client-Key
in: header
schema:
type: string
example: 'pbmYjsswixLjpqmj'
responses:
'200':
description: Successful response
content:
application/json:
schema:
properties:
is_success:
description: The boolean flag denoting if payment link/charge was successfully created
type: boolean
redirect_url:
description: The unique PortOne key for merchant
type: string
channel_order_ref:
description: The unique Order reference generated by PSP for transaction.
type: string
merchant_order_ref:
description: The unique Order reference generated by merchant for transaction.
type: string
order_ref:
description: The unique Order reference generated by PortOne for transaction.
type: string
message:
description: The extra message about the transaction
type: string
deep_link:
description: The deep-link for transaction to use in mobile
type: string
additional_data:
description: The additional metadata of transaction
type: object
qrcode_url:
description: The QR Code Image URL which merchant can use to scan and complete the transaction
type: string
expiry_in_minutes:
description: The expiration time in minutes for the QRCode based transaction
type: string
example: |-
{
"is_success": true,
"redirect_url": "https://pm-redirects.stripe.com/authorize/acct_1JmaEEJrbhj1WB8Z/pa_nonce_LfpPJY3Ho2MuYLj2aCK6j4tEAJzWxzj",
"channel_order_ref": "pi_3KyTl5Jrbhj1WB8Z017xJS9i",
"merchant_order_ref": "Merchant1652330173615",
"order_ref": "2937z05mrtN17ZYigwZhfKdqEGQ",
"message": "",
"deep_link": "",
"additional_data": null,
"qrcode_url": "https://image.portone.ip/3647863746876478-qrcode.jpreg",
"expiry_in_minutes": "20"
}
'401':
description: Failure response
content:
application/json:
schema:
properties:
is_success:
description: The boolean flag denoting if payment link/charge was successfully created
type: boolean
message:
description: The extra message about the transaction
type: string
status_code:
description: The status_code for transaction of transaction creation
type: string
status_reason:
description: The status_reason for transaction of transaction creation
type: string
example: |-
{
"is_success": false,
"message": "signature_hash is a required field",
"status_code": "4001",
"status_reason": "INVALID_PAYMENT_REQUEST"
}
/api/paymentLink:
post:
tags:
- Payment APIs
summary: Create Payment Link
description: |-
Create a payment link. In response you will get the Payment Link reference and the Payment link URL. You can share the payment link with your customer. The master merchant can also create the payment link for their sub-merchants, by passing the sub-merchant key as a header. Refer API docs for additional information.
requestBody:
content:
application/json:
schema:
properties:
portone_key:
description: The unique PortOne key for merchant
type: string
merchant_details:
$ref: '#/components/schemas/MerchantDetails'
merchant_order_id:
description: The unique Merchant Order reference generated by merchant
type: string
signature_hash:
description: The signature_hash of payment link details generated as per <a href="/docs/payment-request" target="_blank">Payment Link Request Signature Documentation</a>
type: string
environment:
description: The environment of transaction either live OR sandbox
type: string
enum: [live, sandbox]
amount:
description: The amount of transaction, can be floating point number
type: number
format: double
currency:
description: The currency of transaction
type: string
country_code:
description: The country_code of transaction
type: string
description:
description: The description of the transaction
type: string
billing_details:
$ref: '#/components/schemas/BillingDetails'
shipping_details:
$ref: '#/components/schemas/ShippingDetails'
order_details:
$ref: '#/components/schemas/OrderDetails'
success_url:
description: The url of success page hosted by merchant.
type: string
failure_url:
description: The url of failure page hosted by merchant.
type: string
pending_url:
description: The url of pending page hosted by merchant.
type: string
expiry_date:
description: Date and time to expire the payment link in UTC format.
type: string
source:
description: "'default', 'api' or 'checkout' -- The Source of Payment Link creation."
type: string
show_shipping_details:
description: Boolean flag to show shipping details in Checkout page
type: boolean
show_back_button:
description: Boolean flag to show back button in Checkout page
type: boolean
is_checkout_embed:
description: Boolean flag to enable checkout embedding
type: boolean
notify_by_email:
description: Boolean flag to notify customer by email
type: boolean
notify_by_phone:
description: Boolean flag to notify customer by phone
type: boolean
notes:
$ref: '#/components/schemas/NotesDetails'
custom_txn_webhook_urls:
description: The array of string havind webhook endpoint URLs
type: array
user_configured_field1:
description: The User configured field 1 for the payment link.
type: string
user_configured_field2:
description: The User configured field 2 for the payment link.
type: string
user_configured_field3:
description: The User configured field 3 for the payment link.
type: string
user_configured_field4:
description: The User configured field 4 for the payment link.
type: string
user_configured_field5:
description: The User configured field 5 for the payment link.
type: string
use_merchant_configured_dcc_rate:
description: Boolean flag to specify to use the merchant configured dcc rate
type: boolean
merchant_dcc_rate:
$ref: '#/components/schemas/MerchantDccRate'
required:
- portone_key
- merchant_order_id
- amount
- currency
- signature_hash
- country_code
- merchant_details
- success_url
- failure_url
- source
- environment
type: object
example:
portone_key: 'pbmYjsswixLjpqmj'
merchant_details:
name: Nike
back_url: https://demo.portone.cloud/checkout.html
promo_code: ''
promo_discount: 0
shipping_charges: 0
merchant_order_id: <Unique Merchant Order ID>
signature_hash: <Generated SignatureHash>
amount: 140000
currency: VND
country_code: VN
billing_details:
billing_name: Test mark
billing_surname: Something
billing_email: jatin@portone.io
billing_phone: '+848959893980'
billing_address:
city: City
country_code: VN
locale: en
line_1: address11
line_2: address_211
postal_code: '400202'
state: Maha
country_name: Vietnam
shipping_details:
shipping_name: xyz
shipping_surname: Something
shipping_email: xyz@gmail.com
shipping_phone: '1234567890'
shipping_address:
city: City
country_code: VN
locale: en
line_1: ' address1'
line_2: ' address_2'
postal_code: '400202'
state: Mah
country_name: Vietnam
order_details:
- id: '1'
price: 140000
name: Stubborn Attachments
quantity: 1
image: https://www.demo.portone.cloud/images/bella-toes.jpg
additional_details:
color: black
size: 20
success_url: https://checkout.portone.cloud/success.html
failure_url: https://checkout.portone.cloud/failure.html
pending_url: https://checkout.portone.cloud/pending.html
expiry_date: '2020-02-27T14:30:00.000Z'
source: api
show_shipping_details: true
show_back_button: false
is_checkout_embed: false
notify_by_email: false
notify_by_phone: false
environment: sandbox
description: PortOne team testing
parameters:
- name: Content-Type
in: header
schema:
type: string
example: application/json
- name: X-Portone-Client-Key
in: header
schema:
type: string
example: 'pbmYjsswixLjpqmj'
- name: X-Portone-SubMerchant-Key
in: header
schema:
type: string
example: 'gvFFggsdgGfrshuh'
- name: Authorization
in: header
description: The `Authorization` header is used to include the JWT for authenticating API requests; learn how to generate the token <a href="/docs/jwt-authentication" target="_blank">in this guide</a>
schema:
type: string
example: >-
Bearer
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjI2NDk3NjU5MDEsImlhdCI6MTY0OTc2NTkwMSwiaXNzIjoiQ0hBSVBBWSIsInN1YiI6Ik5QU2taWlllZkd5S3ZCeGkifQ.VHicuV4dvfp8skktlcRVJNS_WwsD_MtKB4JLBbLWOcQ
responses:
'200':
description: Successful response
content:
application/json:
schema:
properties:
payment_link_ref:
description: The unique payment link reference stored in PortOnes database.
type: string
payment_link:
description: The payment link generated on PortOne.
type: string
example: |-
{
"payment_link_ref": "2BEemUknaImTq5ljmoNQQV2tSll",
"payment_link": "https://checkout.portone.cloud?ref=2BEemUknaImTq5ljmoNQQV2tSll"
}
'401':
description: Failure response
content:
application/json:
schema:
properties:
is_success:
description: The boolean flag denoting if payment link/charge was successfully created
type: boolean
message:
description: The extra message about the transaction
type: string
status_code:
description: The status_code for transaction of transaction creation
type: string
status_reason:
description: The status_reason for transaction of transaction creation
type: string
example: |-
{
"is_success": false,
"message": "signature_hash is a required field",
"status_code": "4010",
"status_reason": "INVALID_UNAUTHORISED_TRANSACTION_IAMPORTKEY_ERROR"
}
/api/update-paylink/{payment_link_ref}:
put:
tags:
- Payment APIs
summary: Update the Payment Link
description: |-
Update a payment link. In response you will get the updated Payment Link details.
requestBody:
content:
application/json:
schema:
properties:
country_code:
description: The country_code of transaction
type: string
amount:
description: The amount of transaction, can be floating point number
type: number
format: double
currency:
description: The currency of transaction
type: string
billing_details:
$ref: '#/components/schemas/BillingDetails'
shipping_details:
$ref: '#/components/schemas/ShippingDetails'
order_details:
$ref: '#/components/schemas/OrderDetails'
success_url:
description: The url of success page hosted by merchant.
type: string
failure_url:
description: The url of failure page hosted by merchant.
type: string
pending_url:
description: The url of pending page hosted by merchant.
type: string
merchant_details:
$ref: '#/components/schemas/MerchantDetails'
expiry_date:
description: Date and time to expire the payment link in UTC format.
type: string
reminder_time:
description: The integer number to configure the reminder
type: number
reminder_time_unit:
description: The string value either 'hour' or 'day', to configure reminder using reminder_time field
type: string
scheduled_date:
description: Date and time to scheduled the payment link in UTC format.
type: string
description:
description: The description of the transaction
type: string
mobile_redirect_url:
description: The URL used in the mobile redirection flow
type: string
show_shipping_details:
description: Boolean flag to show shipping details in Checkout page
type: boolean
show_back_button:
description: Boolean flag to show back button in Checkout page
type: boolean
default_guest_checkout:
description: Boolean flag to setup the default guest checkout for this created payment link
type: boolean
is_checkout_embed:
description: Boolean flag to enable checkout embedding
type: boolean
notify_by_email:
description: Boolean flag to notify customer by email
type: boolean
notify_by_phone:
description: Boolean flag to notify customer by phone
type: boolean
is_billing_shipping_same:
description: Boolean flag to configure the same billing and shipping address
type: boolean
show_items:
description: Boolean flag to show items in checkout UI
type: boolean
show_saved_cards:
description: Boolean flag to show the saved cards in the checkout UI
type: boolean
notes:
$ref: '#/components/schemas/NotesDetails'
custom_txn_webhook_urls:
description: The array of string havind webhook endpoint URLs
type: array
user_configured_field1:
description: The User configured field 1 for the payment link.
type: string
user_configured_field2:
description: The User configured field 2 for the payment link.
type: string
user_configured_field3:
description: The User configured field 3 for the payment link.
type: string
user_configured_field4:
description: The User configured field 4 for the payment link.
type: string
user_configured_field5:
description: The User configured field 5 for the payment link.
type: string
customer_details:
$ref: '#/components/schemas/CustomerDetails'
use_merchant_configured_dcc_rate:
description: Boolean flag to specify to use the merchant configured dcc rate
type: boolean
merchant_dcc_rate:
$ref: '#/components/schemas/MerchantDccRate'
parameters:
- name: Content-Type
in: header
schema:
type: string
example: application/json
- name: X-Portone-Client-Key
in: header
schema:
type: string
example: 'sadfsadd'
- name: X-Portone-SubMerchant-Key
in: header
schema:
type: string
example: 'gvFFggsdgGfrshuh'
- name: payment_link_ref
in: path
schema:
type: string
required: true
- name: Authorization
in: header
description: The `Authorization` header is used to include the JWT for authenticating API requests; learn how to generate the token <a href="/docs/jwt-authentication" target="_blank">in this guide</a>
schema:
type: string
example: >-
Bearer
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjI2NDk3NjU5MDEsImlhdCI6MTY0OTc2NTkwMSwiaXNzIjoiQ0hBSVBBWSIsInN1YiI6Ik5QU2taWlllZkd5S3ZCeGkifQ.VHicuV4dvfp8skktlcRVJNS_WwsD_MtKB4JLBbLWOcQ
responses:
'200':
description: Successful response
content:
application/json:
schema:
properties:
country_code:
description: The country_code of transaction
type: string
amount:
description: The amount of transaction, can be floating point number
type: number
format: double
currency:
description: The currency of transaction
type: string
billing_details:
$ref: '#/components/schemas/BillingDetails'
shipping_details:
$ref: '#/components/schemas/ShippingDetails'
order_details:
$ref: '#/components/schemas/OrderDetails'
success_url:
description: The url of success page hosted by merchant.
type: string
failure_url:
description: The url of failure page hosted by merchant.
type: string
pending_url:
description: The url of pending page hosted by merchant.
type: string
merchant_details:
$ref: '#/components/schemas/MerchantDetails'
expiry_date:
description: Date and time to expire the payment link in UTC format.
type: string
reminder_time:
description: The integer number to configure the reminder
type: number
reminder_time_unit:
description: The string value either 'hour' or 'day', to configure reminder using reminder_time field
type: string
scheduled_date:
description: Date and time to scheduled the payment link in UTC format.
type: string
description:
description: The description of the transaction
type: string
mobile_redirect_url:
description: The URL used in the mobile redirection flow
type: string
show_shipping_details:
description: Boolean flag to show shipping details in Checkout page
type: boolean
show_back_button:
description: Boolean flag to show back button in Checkout page
type: boolean
default_guest_checkout:
description: Boolean flag to setup the default guest checkout for this created payment link
type: boolean
is_checkout_embed:
description: Boolean flag to enable checkout embedding
type: boolean
notify_by_email:
description: Boolean flag to notify customer by email
type: boolean
notify_by_phone:
description: Boolean flag to notify customer by phone
type: boolean
is_billing_shipping_same:
description: Boolean flag to configure the same billing and shipping address
type: boolean
show_items:
description: Boolean flag to show items in checkout UI
type: boolean
show_saved_cards:
description: Boolean flag to show the saved cards in the checkout UI
type: boolean
custom_txn_webhook_urls:
description: The array of string havind webhook endpoint URLs
type: array
user_configured_field1:
description: The User configured field 1 for the payment link.
type: string
user_configured_field2:
description: The User configured field 2 for the payment link.
type: string
user_configured_field3:
description: The User configured field 3 for the payment link.
type: string
user_configured_field4:
description: The User configured field 4 for the payment link.
type: string
user_configured_field5:
description: The User configured field 5 for the payment link.
type: string
customer_details:
$ref: '#/components/schemas/MerchantDccRate'
use_merchant_configured_dcc_rate:
description: Boolean flag to specify to use the merchant configured dcc rate
type: boolean
merchant_dcc_rate:
$ref: '#/components/schemas/MerchantDccRate'
example: |-
{
"content": {
"chaipay_key": "hjgfshdfhgsfdhg",
"country_code": "TH",
"merchant_order_id": "Paymentlink1747906911047",
"amount": 300,
"currency": "USD",
"billing_details": {
"billing_name": "nmnm",
"billing_surname": "ioio",
"billing_email": "sample@chai.finance",
"billing_phone": "+919449233127",
"billing_address": {
"city": "Bangalore",
"country_code": "VN",
"locale": "en",
"line_1": "Suncity Ambegaon",
"line_2": "address_211",
"postal_code": "400202",
"state": "Maha",
"country_name": "Vietnam",
"address_ref": "2w1rzWES2Vi8OfVpr3bZBy9glCn"
}
},
"shipping_details": {
"shipping_name": "xyz",
"shipping_surname": "Something",
"shipping_email": "xyz@gmail.com",
"shipping_phone": "1234567890",
"shipping_address": {
"city": "City",
"country_code": "VN",
"locale": "en",
"line_1": " address1",
"line_2": " address_2",
"postal_code": "400202",
"state": "Mah",
"country_name": "Vietnam",
"address_ref": "2w1rzY0lAxKHXFpcgGRpkoAXxT7"
}
},
"order_details": [
{
"id": "0",
"name": "Test2",
"price": 50,
"quantity": 4,
"image": "",
"marked_price": 0,
"discount_amount": 0,
"discount_percent": 0,
"additional_details": {}
},
{
"id": "knb",
"name": "Test3",
"price": 200,
"quantity": 1,
"image": "",
"marked_price": 0,
"discount_amount": 0,
"discount_percent": 0,
"additional_details": {}
}
],
"success_url": "https://checkout.portone.cloud/success.html",
"failure_url": "https://checkout.portone.cloud/failure.html",
"pending_url": "https://checkout.portone.cloud/pending.html",
"signature_hash": "adsds/dsfsdfsdsd=",
"merchant_details": {
"name": "Nike",
"logo": "",
"back_url": "https://demo.portone.cloud/checkout.html",
"shipping_charges": 100,
"promo_code": "NA",
"promo_discount": 200,
"brand_primary_color": "#de643b",
"brand_secondary_color": "#f0f0f0"
},
"expiry_hours": 48,
"status": "Created",
"link": "https://stage-checkout.portone.cloud?ref=2xRhhOh6GxQEulSn2Yf7wAchJ3z",
"created_at": "2025-05-22T09:41:51.308683Z",
"expired_at": "2025-05-28T15:41:35.924193+05:30",
"source": "api",
"description": "PortOne team testing",
"mobile_redirect_url": "",
"show_shipping_details": true,
"show_back_button": true,
"default_guest_checkout": false,
"is_checkout_embed": false,
"notify_by_email": true,
"notify_by_phone": true,
"is_billing_shipping_same": false,
"show_items": true,
"environment": "sandbox",
"bank_details": {
"is_merchant_sponsored": false,
"override_default": false
},
"link_order_ref": "Paymentlink1747906911047",
"customer_details": {
"name": "new",
"email_address": "new@chai.finance",
"phone_number": "+919481403127"
},
"unit_amount": 0,
"stock_quantity": 0,
"chosen_payment_methods": {},
"custom_page_fields": {},
"notes": null,
"master_merchant_key": "",
"show_saved_cards": false,
"support_email": "qa@t.vom",
"support_phone": "+9176327456354",
"qrcode_link": "",
"custom_txn_webhook_urls": null,
"transaction_forex_details": null,
"dynamic_currency_checkout_enabled": true,
"dynamic_currency_signature_hash": "",
"portone_key": "7ywetytwyegytg",
"user_configured_field1": "new data 1",
"user_configured_field2": "",
"user_configured_field3": "data dat dat",
"user_configured_field4": "",
"user_configured_field5": "",
"dcc_markup_factor": 0,
"is_dcc_invoice_checkout_defaulted": false,
"show_fx_conversion": false
},
"message": "Payment link updated successfully",
"status_code": "2000",
"status_reason": "SUCCESS"
}
'401':
description: Failure response
content:
application/json:
schema:
properties:
is_success:
description: The boolean flag denoting if payment link/charge was successfully created
type: boolean
message:
description: The extra message about the transaction
type: string
status_code:
description: The status_code for transaction of transaction creation
type: string
status_reason:
description: The status_reason for transaction of transaction creation
type: string
example: |-
{
"is_success": false,
"message": "JWT authentication error",
"status_code": "4010",
"status_reason": "INVALID_JWT_TOKEN"
}
/api/paymentLink/{payment_link_ref}/status/{link_status}:
put:
tags:
- Payment APIs
summary: Update Payment Link Status
description: |-
Update the status of the Payment Link. Currently only updating the "cancelled" status is supported.
requestBody:
content: {}
parameters:
- name: X-Portone-Client-Key
in: header
schema:
type: string
example: NPSkZZYefGyKvBxi
- name: Authorization
in: header
description: The `Authorization` header is used to include the JWT for authenticating API requests; learn how to generate the token <a href="/docs/jwt-authentication" target="_blank">in this guide</a>
schema:
type: string
example: >-
Bearer
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjI2NDk3NjU5MDEsImlhdCI6MTY0OTc2NTkwMSwiaXNzIjoiQ0hBSVBBWSIsInN1YiI6Ik5QU2taWlllZkd5S3ZCeGkifQ.VHicuV4dvfp8skktlcRVJNS_WwsD_MtKB4JLBbLWOcQ
- name: payment_link_ref
in: path
schema:
type: string
required: true
example: 23gvghsy4yu2f3yfy23uyfy2uf24
- name: link_status
in: path
schema:
type: string
required: true
example: cancelled
responses:
'200':
description: Successful response
content:
application/json:
schema:
properties:
message:
description: The extra message about the transaction
type: string
status_code:
description: The status_code for transaction of transaction creation
type: string
status_reason:
description: The status_reason for transaction of transaction creation
type: string
example: |-
{
"message": "Payment link status updated successfully to cancelled",
"status_code": "2000",
"status_reason": "SUCCESS"
}
'401':
description: Failure response
content:
application/json:
schema:
properties:
message:
description: The extra message about the transaction
type: string
status_code:
description: The status_code for transaction of transaction creation
type: string
status_reason:
description: The status_reason for transaction of transaction creation
type: string
example: |-
{
"message": "Invalid status! Only cancelled status is allowed",
"status_code": "4001",
"status_reason": "INVALID_PAYMENT_REQUEST"
}
/api/merchant/{key}/webhook:
post:
tags:
- Payment APIs
summary: Add Webhook Endpoint
description: |-
Add the webhook endpoint for PortOne. Along with Webhook details you'll need to specify the environment and webhook type in the request. Refer PortOne docs for additional details.
requestBody:
content:
application/json:
schema:
properties:
name:
description: The unique name of webhook endpoint.
type: string
url:
description: The unique url for webhook endpoint.
type: string
type:
description: The type of webhook being configured. Refer <a href="/docs/webhook-configuration" target="_blank">PortOne Webhooks</a> for more information.
type: string
enum: [payment_status, payment_link_status, refund_status, subscription_status, payout_status, onboarding_status]
environment:
description: The environment of the transaction is either live OR sandbox
type: string
enum: [live, sandbox]
type: object
required:
- name
- url
- type
- environment
example:
name: webhook test
url: >-
https://webhook.site/e707eb14-a2b4-4684-b8de-6470ed78f99cssdfsdf
type: payment_status
environment: live
parameters:
- name: X-Portone-Client-Key
in: header
schema:
type: string
example: ShgshjhgHdg
- name: Authorization
in: header
description: The `Authorization` header is used to include the JWT for authenticating API requests; learn how to generate the token <a href="/docs/jwt-authentication" target="_blank">in this guide</a>
schema:
type: string
example: >-
Bearer
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjI2NDk3NjU5MDEsImlhdCI6MTY0OTc2NTkwMSwiaXNzIjoiQ0hBSVBBWSIsInN1YiI6Ik5QU2taWlllZkd5S3ZCeGkifQ.VHicuV4dvfp8skktlcRVJNS_WwsD_MtKB4JLBbLWOcQ
- name: key
in: path
schema:
type: string
required: true
responses:
'200':
description: Successful response
content:
application/json:
schema:
properties:
content:
$ref: '#/components/schemas/WebhookContent'
message:
description: The description of the API request execution result
type: string
status_code:
description: The status_code for transaction of transaction creation
type: string
status_reason:
description: The status_reason for transaction of transaction creation
type: string
example: |-
{
"content": {
"name": "webhook test",
"uuid": "7a02688b-5b58-4d19-a718-2b4681f5f2b7",
"url": "https://webhook.site/e707eb14-a2b4-4684-b8de-6470ed78f99cssdfsdf",
"enabled": true,
"created_at": "2022-06-29 05:50:34.020042694 +0000 UTC",
"type": "payment_status"
},
"message": "Webhook added successfully!",
"status_code": "2000",
"status_reason": "SUCCESS"
}
'401':
description: Failure response
content:
application/json:
schema:
properties:
message:
description: The description of the API request execution result
type: string
status_code:
description: The status_code for transaction of transaction creation
type: string
status_reason:
description: The status_reason for transaction of transaction creation
type: string
example: |-
{
"message": "invalid auth key",
"status_code": "4010",
"status_reason": "INVALID_UNAUTHORISED_TRANSACTION_IAMPORTKEY_ERROR"
}
get:
tags:
- Payment APIs
summary: Fetch All Webhook Endpoints
description: |-
Fetch the webhook endpoints added. You'll need to specify the environment as query parameter in the request. In response you will get the webhook details.
parameters:
- name: X-Portone-Client-Key
in: header
schema:
type: string
example: ShgshjhgHdg
- name: Authorization
in: header
description: The `Authorization` header is used to include the JWT for authenticating API requests; learn how to generate the token <a href="/docs/jwt-authentication" target="_blank">in this guide</a>
schema:
type: string
example: >-
Bearer
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjI2NDk3NjU5MDEsImlhdCI6MTY0OTc2NTkwMSwiaXNzIjoiQ0hBSVBBWSIsInN1YiI6Ik5QU2taWlllZkd5S3ZCeGkifQ.VHicuV4dvfp8skktlcRVJNS_WwsD_MtKB4JLBbLWOcQ
- name: environment
in: query
schema:
type: string
example: live
required: true
- name: key
in: path
schema:
type: string
required: true
responses:
'200':
description: Successful response
content:
application/json:
schema:
properties:
content:
type: array
items:
$ref: '#/components/schemas/WebhookContent'
description: The metadata of the webhooks configured in the PortOne.
message:
description: The description of the API request execution result
type: string
status_code:
description: The status_code for transaction of transaction creation
type: string
status_reason:
description: The status_reason for transaction of transaction creation
type: string
example: |-
{
"content": [
{
"name": "webhook testing",
"uuid": "a7b0cbce-c2bd-46c6-a66f-527d637163f9",
"url": "https://webhook.site/89cbdbbf-0658-4d2d-b8de-7f59c516af7a",
"enabled": true,
"created_at": "2022-04-20T07:25:58.457526Z",
"type": "payment_status"
}
],
"message": "Webhook fetched successfully!",
"status_code": "2000",
"status_reason": "SUCCESS"
}
'401':
description: Failure response
content:
application/json:
schema:
properties:
message:
description: The description of the API request execution result
type: string
status_code:
description: The status_code for transaction of transaction creation
type: string
status_reason:
description: The status_reason for transaction of transaction creation
type: string
example: |-
{
"message": "key is a required field",
"status_code": "4010",
"status_reason": "INVALID_UNAUTHORISED_TRANSACTION_IAMPORTKEY_ERROR"
}
/api/transaction/{merchantOrderRef}/status:
get:
tags:
- Payment APIs
summary: Get Transaction Status
description: |-
Fetch the status of the Transaction. Status will be either "Success/ Failed or Pending". Refer PortOne docs for additional details.
parameters:
- name: X-Portone-Client-Key
in: header
schema:
type: string
example: ShgshjhgHdg
- name: Authorization
in: header
description: The `Authorization` header is used to include the JWT for authenticating API requests; learn how to generate the token <a href="/docs/jwt-authentication" target="_blank">in this guide</a>
schema:
type: string
example: >-
Bearer
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjI2NDk3NjU5MDEsImlhdCI6MTY0OTc2NTkwMSwiaXNzIjoiQ0hBSVBBWSIsInN1YiI6Ik5QU2taWlllZkd5S3ZCeGkifQ.VHicuV4dvfp8skktlcRVJNS_WwsD_MtKB4JLBbLWOcQ
- name: merchantOrderRef
in: path
schema:
type: string
required: true
example: MERCHANT1647433108462
responses:
'200':
description: Successful response
content:
application/json:
schema:
properties:
content:
$ref: '#/components/schemas/TransactionStatusContent'
status_code:
description: The status_code for API request execution result
type: string
status_reason:
description: The status_reason for API request execution result
type: string
example: |-
{
"content": {
"channel_order_ref": "6G457114F4645741R",
"order_ref": "2YGZp22ExeOu0As61wa7i0JyMJn",
"status": "Expired"
},
"status_code": "2000",
"status_reason": "SUCCESS"
}
/api/{key}/transaction-details:
post:
tags:
- Payment APIs
summary: Get Transaction Details
description: |-
Fetch the details of the Transaction.
requestBody:
content:
application/json:
schema:
properties:
order_ref:
description: The unique Order reference generated by PortOne for transaction.
type: string
required:
- order_ref
example:
order_ref: 2U9H9Fax1AtSb9zdyxVpTtGOcwQ_1
parameters:
- name: X-Portone-Client-Key
in: header
schema:
type: string
example: ShgshjhgHdg
- name: Authorization
in: header
description: The `Authorization` header is used to include the JWT for authenticating API requests; learn how to generate the token <a href="/docs/jwt-authentication" target="_blank">in this guide</a>
schema:
type: string
example: >-
Bearer
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjI2NDk3NjU5MDEsImlhdCI6MTY0OTc2NTkwMSwiaXNzIjoiQ0hBSVBBWSIsInN1YiI6Ik5QU2taWlllZkd5S3ZCeGkifQ.VHicuV4dvfp8skktlcRVJNS_WwsD_MtKB4JLBbLWOcQ
- name: key
in: path
schema:
type: string
required: true
example: ShgshjhgHdg
responses:
'200':
description: Successful response
content:
application/json:
schema:
properties:
content:
$ref: '#/components/schemas/TransactionDetailsContent'
message:
description: The description of the API request execution result
type: string
status_code:
description: The status_code for API request execution result
type: string
status_reason:
description: The status_reason for API request execution result
type: string
example: |-
{
"content": {
"currency": "VND",
"amount": 10000,
"order_ref": "2UQK3at2JV2bZ4Sg73Wm7YA6yIa",
"channel_order_ref": "",
"merchant_order_ref": "2UQK3EteNT2XWVbvaioHaluClrv_1",
"country_code": "TH",
"status": "Initiated",
"channel_key": "APPOTAPAY",
"method_name": "CARD",
"method_key": "APPOTAPAY_CREDIT_CARD",
"channel_logo": "https://chaiport-pg-icons-latest-nov.s3.ap-southeast-1.amazonaws.com/appota.png",
"method_sub_type": "INT_CREDIT_DEBIT_CARD",
"buyer_name": "",
"buyer_email": "test@gmail.com",
"buyer_phone": "",
"buyer_address1": "address",
"buyer_address2": "address_2",
"buyer_city": "City",
"buyer_country": "TH",
"status_code": "",
"status_reason": "",
"status_channel_reason": "",
"date": "2023-08-24T08:36:05.127827Z",
"is_refund_allowed": true,
"is_multi_refund_allowed": false,
"refund_completed": false,
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36",
"ip_address": "103.5.134.77",
"description": "",
"payment_link_ref": "2UQJiXOKq0R9PiB8oVYXocmYEo9",
"source": "checkout",
"payment_method_used": "",
"merchant_name": "PortOne",
"merchant_key": "dzcylAVbbBkhkSeg",
"merchant_email_address": "cenoyeh653@canyona.com",
"channel_name": "APPOTAPAY",
"payment_link_merchant_order_ref": "21DF3546B042821",
"customer_email_address": "",
"customer_phone_number": "test@gmail.com",
"customer_name": "",
"created_by": "kalpesh+payout@portone.io",
"user_message": "",
"routing_enabled": false,
"payment_page_ref": "",
"refund_status": "",
"subscription_order_ref": "",
"is_cross_border_transaction": false,
"order_details": {
"data": [
{
"item_id": "knb",
"product_name": "Test",
"price": 100,
"quantity": 1,
"image": "",
"additional_details": {
"customer_id": "123",
"order_id": "abc"
}
}
]
}
},
"status_code": "2000",
"status_reason": "SUCCESS"
}
'400':
description: Failure response
content:
application/json:
schema:
properties:
message:
description: The description of the API request execution result
type: string
status_code:
description: The status_code for transaction of transaction creation
type: string
status_reason:
description: The status_reason for transaction of transaction creation
type: string
example: |-
{
"message": "Transaction record with given reference not found",
"status_code": "4096",
"status_reason": "INVALID_REFERENCE"
}
/api/paymentLink/{merchantLinkRef}/status:
get:
tags:
- Payment APIs
summary: Fetch Payment Link Status using Mch Link Ref (Deprecated)
description: |-
Fetch the status of the Payment Link. Status will be either "Success/ Deleted or Created". Refer PortOne docs for additional details.
parameters:
- name: X-Portone-Client-Key
in: header
schema:
type: string
example: ShgshjhgHdg
- name: Authorization
in: header
description: The `Authorization` header is used to include the JWT for authenticating API requests; learn how to generate the token <a href="/docs/jwt-authentication" target="_blank">in this guide</a>
schema:
type: string
example: >-
Bearer
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjI2NDk3NjU5MDEsImlhdCI6MTY0OTc2NTkwMSwiaXNzIjoiQ0hBSVBBWSIsInN1YiI6Ik5QU2taWlllZkd5S3ZCeGkifQ.VHicuV4dvfp8skktlcRVJNS_WwsD_MtKB4JLBbLWOcQ
- name: merchantLinkRef
in: path
schema:
type: string
required: true
example: 2212D256605F222
responses:
'200':
description: Successful response
content:
application/json:
schema:
properties:
content:
$ref: '#/components/schemas/PaymentLinkContent'
message:
description: The description of the API request execution result
type: string
status_code:
description: The status_code for API request execution result
type: string
status_reason:
description: The status_reason for API request execution result
type: string
example: |-
{
"content": {
"merchantOrderRef": "2212D256605F222",
"paymentLinkRef": "2kxG67L5yd3d6spRv76uE1QWnR5",
"status": "Success",
"transactionsList": [
{
"channelOrderRef": "0",
"createdAt": "2022-06-14T09:30:45.152761Z",
"merchantOrderRef": "Merchant1655199044347",
"status": "Success",
"statusCode": "2000",
"statusReason": "Success"
}
]
},
"status_code": "2000",
"status_reason": "SUCCESS"
}
'401':
description: Failure response
content:
application/json:
schema:
properties:
message:
description: The description of the API request execution result
type: string
status_code:
description: The status_code for transaction of transaction creation
type: string
status_reason:
description: The status_reason for transaction of transaction creation
type: string
example: |-
{
"message": "key is a required field",
"status_code": "4010",
"status_reason": "INVALID_UNAUTHORISED_TRANSACTION_IAMPORTKEY_ERROR"
}
/api/paymentLink/{portOneLinkRef}/fetch-status:
get:
tags:
- Payment APIs
summary: Fetch Payment Link Status using PortOne Link Ref
description: |-
Fetch the status of the Payment Link. Status will be either "Success/ Deleted or Created". Refer PortOne docs for additional details.
parameters:
- name: X-Portone-Client-Key
in: header
schema:
type: string
example: ShgshjhgHdg
- name: Authorization
in: header
description: The `Authorization` header is used to include the JWT for authenticating API requests; learn how to generate the token <a href="/docs/jwt-authentication" target="_blank">in this guide</a>
schema:
type: string
example: >-
Bearer
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjI2NDk3NjU5MDEsImlhdCI6MTY0OTc2NTkwMSwiaXNzIjoiQ0hBSVBBWSIsInN1YiI6Ik5QU2taWlllZkd5S3ZCeGkifQ.VHicuV4dvfp8skktlcRVJNS_WwsD_MtKB4JLBbLWOcQ
- name: portOneLinkRef
in: path
schema:
type: string
required: true
example: 2kxG67L5yd3d6spRv76uE1QWnR5
responses:
'200':
description: Successful response
content:
application/json:
schema:
properties:
content:
$ref: '#/components/schemas/PaymentLinkContent'
message:
description: The description of the API request execution result
type: string
status_code:
description: The status_code for API request execution result
type: string
status_reason:
description: The status_reason for API request execution result
type: string
example: |-
{
"content": {
"merchantOrderRef": "2212D256605F222",
"paymentLinkRef": "2kxG67L5yd3d6spRv76uE1QWnR5",
"status": "Success",
"transactionsList": [
{
"channelOrderRef": "0",
"createdAt": "2022-06-14T09:30:45.152761Z",
"merchantOrderRef": "2212D256605F222",
"status": "Success",
"statusCode": "2000",
"statusReason": "Success"
}
]
},
"status_code": "2000",
"status_reason": "SUCCESS"
}
'401':
description: Failure response
content:
application/json:
schema:
properties:
message:
description: The description of the API request execution result
type: string
status_code:
description: The status_code for transaction of transaction creation
type: string
status_reason:
description: The status_reason for transaction of transaction creation
type: string
example: |-
{
"message": "key is a required field",
"status_code": "4010",
"status_reason": "INVALID_UNAUTHORISED_TRANSACTION_IAMPORTKEY_ERROR"
}
/api/merchant/{smchKey}/paymentLink/{merchantLinkRef}/status:
get:
tags:
- Payment APIs
summary: Fetch Payment Link Status using Merchant Link Ref (New)
description: |-
Fetch the status of the Payment Link. Status will be either "Success/ Deleted or Created". Refer PortOne docs for additional details.
parameters:
- name: X-Portone-Client-Key
in: header
schema:
type: string
example: ShgshjhgHdg
- name: Authorization
in: header
description: The `Authorization` header is used to include the JWT for authenticating API requests; learn how to generate the token <a href="/docs/jwt-authentication" target="_blank">in this guide</a>
schema:
type: string
example: >-
Bearer
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjI2NDk3NjU5MDEsImlhdCI6MTY0OTc2NTkwMSwiaXNzIjoiQ0hBSVBBWSIsInN1YiI6Ik5QU2taWlllZkd5S3ZCeGkifQ.VHicuV4dvfp8skktlcRVJNS_WwsD_MtKB4JLBbLWOcQ
- name: smchKey
in: path
schema:
type: string
required: true
example: ShgshjhgHdg
- name: merchantLinkRef
in: path
schema:
type: string
required: true
example: 2212D256605F222
responses:
'200':
description: Successful response
content:
application/json:
schema:
properties:
content:
$ref: '#/components/schemas/PaymentLinkContent'
message:
description: The description of the API request execution result
type: string
status_code:
description: The status_code for API request execution result
type: string
status_reason:
description: The status_reason for API request execution result
type: string
example: |-
{
"content": {
"merchantOrderRef": "2212D256605F222",
"paymentLinkRef": "2BEemUknaImTq5ljmoNQQV2tSll",
"status": "Success",
"transactionsList": [
{
"channelOrderRef": "0",
"createdAt": "2022-06-14T09:30:45.152761Z",
"merchantOrderRef": "Merchant1655199044347",
"status": "Success",
"statusCode": "2000",
"statusReason": "Success"
}
]
},
"status_code": "2000",
"status_reason": "SUCCESS"
}
'401':
description: Failure response
content:
application/json:
schema:
properties:
message:
description: The description of the API request execution result
type: string
status_code:
description: The status_code for transaction of transaction creation
type: string
status_reason:
description: The status_reason for transaction of transaction creation
type: string
example: |-
{
"message": "key is a required field",
"status_code": "4010",
"status_reason": "INVALID_UNAUTHORISED_TRANSACTION_IAMPORTKEY_ERROR"
}
/api/merchant/{key}/add-pay-channel/{pckey}:
post:
tags:
- Payment APIs
summary: Add PSP Credentials
description: |-
Add the credentials of Payment Channel in PortOne. In response you'll get the maskedData of the credentials.
requestBody:
content:
application/json:
schema:
properties:
creds:
description: The credentials JSON consisting of the data required by PSP
type: object
country:
description: The country of the PSP. e.g. - GLOBAL, VN, TH, ID
type: string
environment:
description: The environment of the transaction is either live OR sandbox
type: string
enum: [live, sandbox]
type: object
required:
- creds
- country
- environment
example:
creds:
accessKey: TestKey
partnerCode: TestCode
secretKey: TestSecretKey
country: VN
environment: sandbox
parameters:
- name: X-Portone-Client-Key
in: header
schema:
type: string
example: ShgshjhgHdg
- name: Authorization
in: header
description: The `Authorization` header is used to include the JWT for authenticating API requests; learn how to generate the token <a href="/docs/jwt-authentication" target="_blank">in this guide</a>
schema:
type: string
example: >-
Bearer
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjI2NDk3NjU5MDEsImlhdCI6MTY0OTc2NTkwMSwiaXNzIjoiQ0hBSVBBWSIsInN1YiI6Ik5QU2taWlllZkd5S3ZCeGkifQ.VHicuV4dvfp8skktlcRVJNS_WwsD_MtKB4JLBbLWOcQ
- name: key
in: path
schema:
type: string
required: true
- name: pckey
in: path
schema:
type: string
required: true
responses:
'200':
description: Successful response
content:
application/json:
schema:
properties:
content:
$ref: '#/components/schemas/PSPCredsContent'
message:
description: The description of the API request execution result
type: string
status_code:
description: The status_code for API request execution result
type: string
status_reason:
description: The status_reason for API request execution result
type: string
example: |-
{
"content": {
"MerchantUUID": "61c842c5-3fdf-4f0e-95bd-51e2c12364ea",
"PaymentChannelKey": "ONEPAY",
"maskedData": {
"accessKey": "**********ewe",
"partnerCode": "**********dJC",
"secretKey": "****************************************************61v"
}
},
"message": "Payment Channel Creds added successfully!",
"status_code": "2000",
"status_reason": "SUCCESS"
}
'401':
description: Failure response
content:
application/json:
schema:
properties:
message:
description: The description of the API request execution result
type: string
status_code:
description: The status_code for transaction of transaction creation
type: string
status_reason:
description: The status_reason for transaction of transaction creation
type: string
example: |-
{
"message": "key is a required field",
"status_code": "4010",
"status_reason": "INVALID_UNAUTHORISED_TRANSACTION_IAMPORTKEY_ERROR"
}
put:
tags:
- Payment APIs
summary: Update PSP Credentials
description: |-
Update the credentials of Payment Channel in PortOne. In response you'll get the maskedData of the credentials.
requestBody:
content:
application/json:
schema:
properties:
creds:
description: The credentials JSON consisting of the data required by PSP
type: object
country:
description: The country of the PSP. e.g. - GLOBAL, VN, TH, ID
type: string
environment:
description: The environment of the transaction is either live OR sandbox
type: string
enum: [live, sandbox]
type: object
required:
- creds
- country
- environment
example:
creds:
accessKey: EoLA0ZbzfKKto1Ne
secretKey: JOS7RdvltX42CEowrHRvna4hAwknpjBT
partnerCode: MOMOF1RA20191002
country: VN
environment: sandbox
parameters:
- name: X-Portone-Client-Key
in: header
schema:
type: string
example: ShgshjhgHdg
- name: Authorization
in: header
description: The `Authorization` header is used to include the JWT for authenticating API requests; learn how to generate the token <a href="/docs/jwt-authentication" target="_blank">in this guide</a>
schema:
type: string
example: >-
Bearer
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjI2NDk3NjU5MDEsImlhdCI6MTY0OTc2NTkwMSwiaXNzIjoiQ0hBSVBBWSIsInN1YiI6Ik5QU2taWlllZkd5S3ZCeGkifQ.VHicuV4dvfp8skktlcRVJNS_WwsD_MtKB4JLBbLWOcQ
- name: key
in: path
schema:
type: string
required: true
- name: pckey
in: path
schema:
type: string
required: true
responses:
'200':
description: Successful response
content:
application/json:
schema:
properties:
content:
$ref: '#/components/schemas/PSPCredsContent'
message:
description: The description of the API request execution result
type: string
status_code:
description: The status_code for API request execution result
type: string
status_reason:
description: The status_reason for API request execution result
type: string
example: |-
{
"content": {
"MerchantUUID": "61c842c5-3fdf-4f0e-95bd-51e2c12364ea",
"PaymentChannelKey": "ONEPAY",
"maskedData": {
"accessKey": "**********ewe",
"partnerCode": "**********dJC",
"secretKey": "****************************************************61v"
}
},
"message": "Payment Channel Creds added successfully!",
"status_code": "2000",
"status_reason": "SUCCESS"
}
'401':
description: Failure response
content:
application/json:
schema:
properties:
message:
description: The description of the API request execution result
type: string
status_code:
description: The status_code for transaction of transaction creation
type: string
status_reason:
description: The status_reason for transaction of transaction creation
type: string
example: |-
{
"message": "key is a required field",
"status_code": "4010",
"status_reason": "INVALID_UNAUTHORISED_TRANSACTION_IAMPORTKEY_ERROR"
}
/api/merchant/{key}/pay-channel/{pckey}:
get:
tags:
- Payment APIs
summary: Fetch PSP Credentials
description: |-
Fetch the credentials of Payment Channel configured in the PortOne. In response you'll get the maskedData of the credentials.
parameters:
- name: X-Portone-Client-Key
in: header
schema:
type: string
example: ShgshjhgHdg
- name: Authorization
in: header
description: The `Authorization` header is used to include the JWT for authenticating API requests; learn how to generate the token <a href="/docs/jwt-authentication" target="_blank">in this guide</a>
schema:
type: string
example: >-
Bearer
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjI2NDk3NjU5MDEsImlhdCI6MTY0OTc2NTkwMSwiaXNzIjoiQ0hBSVBBWSIsInN1YiI6Ik5QU2taWlllZkd5S3ZCeGkifQ.VHicuV4dvfp8skktlcRVJNS_WwsD_MtKB4JLBbLWOcQ
- name: environment
in: query
schema:
type: string
example: sandbox
required: true
- name: payType
in: query
schema:
type: string
example: PAYIN
required: true
- name: key
in: path
schema:
type: string
required: true
- name: pckey
in: path
schema:
type: string
required: true
responses:
'200':
description: Successful response
content:
application/json:
schema:
properties:
content:
type: array
items:
$ref: '#/components/schemas/PSPCredsMetaContent'
message:
description: The description of the API request execution result
type: string
status_code:
description: The status_code for API request execution result
type: string
status_reason:
description: The status_reason for API request execution result
type: string
example: |-
{
"content": [
{
"key": "ONEPAY",
"type": "Gateway",
"logo": "https://PortOne-pg-icons-latest-nov.s3.ap-southeast-1.amazonaws.com/onepay.png",
"creds": {
"accessKey": "**********ewe",
"partnerCode": "**********dJC",
"secretKey": "****************************************************61v"
},
"is_enabled": true,
"country": "VN",
"pay_type": "PAYIN",
"is_va_flow": false
}
],
"message": "Payment Channel Creds fetched successfully!",
"status_code": "2000",
"status_reason": "SUCCESS"
}
'401':
description: Failure response
content:
application/json:
schema:
properties:
message:
description: The description of the API request execution result
type: string
status_code:
description: The status_code for transaction of transaction creation
type: string
status_reason:
description: The status_reason for transaction of transaction creation
type: string
example: |-
{
"message": "key is a required field",
"status_code": "4010",
"status_reason": "INVALID_UNAUTHORISED_TRANSACTION_IAMPORTKEY_ERROR"
}
/api/transaction/status:
put:
tags:
- Payment APIs
summary: Update Transaction Status
description: |-
Update Transaction Status or COD Order Status
requestBody:
content:
application/json:
schema:
properties:
status:
description: The status of the transaction, either 'Success' or 'Failed'
type: string
merchant_order_ref:
description: The unique merchant order reference generated by the merchant
type: string
signature:
description: The SignatureHash of the payload data
type: string
type: object
required:
- status
- merchant_order_ref
- signature
example:
merchant_order_ref: Merchant1655292274163
status: Success
signature: +tIV05AsEX4mffPTXayhmkZrWX7qb5w+sBS0gjE7ScE=
parameters:
- name: X-Portone-Client-Key
in: header
schema:
type: string
example: NPSkZZYefGyKvBxi
- name: Authorization
in: header
description: The `Authorization` header is used to include the JWT for authenticating API requests; learn how to generate the token <a href="/docs/jwt-authentication" target="_blank">in this guide</a>
schema:
type: string
example: >-
Bearer
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjI2NDk3NjU5MDEsImlhdCI6MTY0OTc2NTkwMSwiaXNzIjoiQ0hBSVBBWSIsInN1YiI6Ik5QU2taWlllZkd5S3ZCeGkifQ.VHicuV4dvfp8skktlcRVJNS_WwsD_MtKB4JLBbLWOcQ
- name: Content-Type
in: header
schema:
type: string
example: application/json
responses:
'200':
description: Successful response
content:
application/json: {}
/api/transaction/{order_ref}/capture:
post:
tags:
- Payment APIs
summary: Capture Transaction
description: |-
Captures transaction with the specified order_ref
parameters:
- name: X-Portone-Client-Key
in: header
schema:
type: string
example: ShgshjhgHdg
- name: Authorization
in: header
description: The `Authorization` header is used to include the JWT for authenticating API requests; learn how to generate the token <a href="/docs/jwt-authentication" target="_blank">in this guide</a>
schema:
type: string
example: >-
Bearer
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjI2NDk3NjU5MDEsImlhdCI6MTY0OTc2NTkwMSwiaXNzIjoiQ0hBSVBBWSIsInN1YiI6Ik5QU2taWlllZkd5S3ZCeGkifQ.VHicuV4dvfp8skktlcRVJNS_WwsD_MtKB4JLBbLWOcQ
- name: order_ref
in: path
description: The order_ref of the transaction to capture
required: true
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
message:
type: string
description: A success message indicating the transaction was captured
status_code:
type: string
description: A code indicating the status of the transaction capture
status_reason:
type: string
description: A reason for the status of the transaction capture
'404':
description: Transaction not found
content:
application/json:
schema:
type: object
properties:
message:
type: string
description: A message indicating the transaction was not found
status_code:
type: string
description: A code indicating the status of the transaction not found error
status_reason:
type: string
description: A reason for the status of the transaction not found error
/api/{portOneKey}/update-transaction-details/{merchant_order_ref}:
put:
tags:
- Payment APIs
summary: Update Transaction Details
description: |-
Update Transaction Details like description and User Configured Fields, Partial update allowed
requestBody:
content:
application/json:
schema:
properties:
description:
description: The description of the transaction
type: string
user_configured_field1:
description: The first User Configured Field
type: string
user_configured_field2:
description: The first User Configured Field
type: string
user_configured_field3:
description: The third User Configured Field
type: string
user_configured_field4:
description: The forth User Configured Field
type: string
user_configured_field5:
description: The fifth User Configured Field
type: string
type: object
example:
description: Sample Text description
user_configured_field1: Success
user_configured_field2: tIV05AsEX4mffPTXayhmkZrWX7qb5w
user_configured_field3: Dummy text
user_configured_field4: Meaningful Reference
user_configured_field5: Random Reference
parameters:
- name: X-Portone-Client-Key
in: header
schema:
type: string
example: NPSkZ23YefGyK232
- name: Authorization
in: header
description: The `Authorization` header is used to include the JWT for authenticating API requests; learn how to generate the token <a href="/docs/jwt-authentication" target="_blank">in this guide</a>
schema:
type: string
example: Bearer {{TOKEN}}
- name: Content-Type
in: header
schema:
type: string
example: application/json
- name: portOneKey
in: path
schema:
type: string
required: true
example: NPSkZZYefGyK232
- name: merchant_order_ref
in: path
schema:
type: string
required: true
example: 23qf2tf1ty2fty321tf123waefy
responses:
'200':
description: Successful response
content:
application/json:
schema:
properties:
content:
description: Object that contains UCF data and configured description
message:
description: The extra message about the transaction
type: string
status_code:
description: The status_code for transaction of transaction creation
type: string
status_reason:
description: The status_reason for transaction of transaction creation
type: string
example: |-
{
"content": {
"description": "Testtttt description",
"user_configured_field1": "🦘",
"user_configured_field2": "+91 9481403127",
"user_configured_field3": "[Yes, No], {op}",
"user_configured_field5": " "
},
"message": "Transaction details updated successfully",
"status_code": "2000",
"status_reason": "SUCCESS"
}
/api/merchant/{key}/fetch-all-payments:
post:
tags:
- Payment APIs
summary: Fetch Merchant Transactions
requestBody:
content:
application/json:
schema:
properties:
page:
description: The page number of the data to be fetched.
type: integer
minimum: 1
size:
description: The page size of the data to be fetched.
type: integer
minimum: 1
from:
description: The from Date to fetch the sub-merchant.
type: string
to:
description: The to Date to fetch the sub-merchant.
type: string
environment:
description: The environment of the transaction is either live OR sandbox
type: string
enum: [live, sandbox]
type: object
required:
- page
- size
- to
- from
- environment
example:
page: 1
size: 10
from: '2022-12-11T09:05:35.803Z'
to: '2024-12-11T09:05:35.803Z'
environment: sandbox
parameters:
- name: X-Portone-Client-Key
in: header
schema:
type: string
example: ShgshjhgHdg
- name: Authorization
in: header
description: The `Authorization` header is used to include the JWT for authenticating API requests; learn how to generate the token <a href="/docs/jwt-authentication" target="_blank">in this guide</a>
schema:
type: string
example: >-
Bearer
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjI2NDk3NjU5MDEsImlhdCI6MTY0OTc2NTkwMSwiaXNzIjoiQ0hBSVBBWSIsInN1YiI6Ik5QU2taWlllZkd5S3ZCeGkifQ.VHicuV4dvfp8skktlcRVJNS_WwsD_MtKB4JLBbLWOcQ
- name: key
in: path
description: The PortOne Key of the merchant.
schema:
type: string
required: true
responses:
'200':
description: Successful response
content:
application/json:
schema:
properties:
body:
$ref: '#/components/schemas/MerchantTransactionsAPIResponseContent'
message:
description: The description of the API request execution result
type: string
status_code:
description: The status code of API response
type: string
status_reason:
description: The status reason of API response
type: string
example: |-
{
"body": {
"content": [
{
"currency": "THB",
"amount": 100,
"order_ref": "2Q42BWdsfdsfs2OHMO1ZJR",
"merchant_order_ref": "2Q42BW2sdcsfsfOHMO1ZJR",
"status": "Failed",
"channel_key": "GBPRIMEPAY",
"method_name": "Credit Card",
"method_key": "GBPRIMEPAY_SUBSCRIPTION_CARD",
"method_type": "SUBSCRIPTION_CARD",
"channel_logo": "https://chaiport-pg-icons-latest-nov.s3.ap-southeast-1.amazonaws.com/gbpay.png",
"method_sub_type": "INT_CREDIT_CARD",
"status_code": "4001",
"status_reason": "INVALID_PAYMENT_REQUEST",
"status_channel_reason": "05 | Do Not Honour",
"created_at": "2024-12-11T09:00:13.466197Z",
"is_refund_allowed": true,
"is_multi_refund_allowed": true,
"source": "checkout",
"payment_method_used": "International Master Card",
"merchant_key": "SglffyyZgojEdXWL",
"merchant_email_address": "testmerchant@gmail.com",
"channel_name": "GBPRIMEPAY",
"remit_status": "UNSETTLED",
"created_by": "testmerchant@gmail.com",
"subscription_order_ref": "2dDRrHsdfsdfNydfaEhsYkawibzIHqJot",
"is_cross_border_transaction": false,
"payment_link_merchant_order_ref": "2wereRrHsdfsdfNydfaEhsYkawibzIHqJot"
}
],
"total_elements": 9102,
"total_pages": 9102,
"size": 1,
"page": 1,
"number_of_elements": 1
},
"status_code": "2000",
"status_message": "SUCCESS"
}
'401':
description: Failure response
content:
application/json:
schema:
properties:
message:
description: The description of the API request execution result
type: string
status_code:
description: The status_code for transaction of transaction creation
type: string
status_reason:
description: The status_reason for transaction of transaction creation
type: string
example: |-
{
"message": "This API does not support the Master merchant queries with Portone Key: SglffyyZgojEdXWL",
"status_code": "4001",
"status_reason": "INVALID_REQUEST"
}
'400':
description: Failure response
content:
application/json:
schema:
properties:
message:
description: The description of the API request execution result
type: string
status_code:
description: The status_code for transaction of transaction creation
type: string
status_reason:
description: The status_reason for transaction of transaction creation
type: string
example: |-
{
"message": "Merchants not found with this PortOne Key : SglffyyZgojEdXWL",
"status_code": "4016",
"status_message": "MERCHANT_NOT_FOUND"
}
components:
schemas:
WebhookContent:
title: WebhookContent
type: object
properties:
name:
type: string
description: 'The name of the webhook'
uuid:
type: string
description: The unique identifier for the webhook
url:
type: string
description: The URL of the webhook
enabled:
type: boolean
description: The boolean flag indicating whether webhook is enabled or not
created_at:
type: string
description: The timestamp of when the webhook was created.
type:
type: string
description: The type of the webhook. E.g. payment_status, payout_status, Refer PortOne docs.
TransactionStatusContent:
title: TransactionStatusContent
type: object
description: The meta details of the transaction.
properties:
order_ref:
type: string
description: The unique Order reference generated by PortOne for transaction.
channel_order_ref:
type: string
description: The unique Order reference generated by PSP for transaction.
status:
type: string
description: The status of the transaction.
TransactionDetailsContent:
title: TransactionDetailsContent
type: object
description: The meta details of the transaction.
properties:
currency:
type: string
description: The currency of transaction
amount:
type: number
format: double
description: The amount of transaction, can be a floating-point number
order_ref:
type: string
description: The unique Order reference generated by PortOne for transaction.
channel_order_ref:
type: string
description: The unique Order reference generated by PSP for transaction.
merchant_order_ref:
type: string
description: The unique Order reference generated by merchant for transaction.
country_code:
type: string
description: 2 digit country code
status:
type: string
description: The status of the transaction.
statusCode:
type: string
description: The status code of the transaction.
statusReason:
type: string
description: The status reason of the transaction.
status_channel_reason:
type: string
description: The status reason provided by the PSP.
channel_key:
type: string
description: The channel key used for the transaction.
method_name:
type: string
description: The method name used for the transaction.
method_key:
type: string
description: The method key used for the transaction.
channel_logo:
type: string
description: The channel logo URL.
method_sub_type:
type: string
description: The method sub-type.
buyer_name:
type: string
description: The buyer's name.
buyer_email:
type: string
description: The buyer's email.
buyer_phone:
type: string
description: The buyer's phone.
buyer_address1:
type: string
description: The buyer's address line 1.
buyer_address2:
type: string
description: The buyer's address line 2.
buyer_city:
type: string
description: The buyer's city.
buyer_country:
type: string
description: The buyer's country.
signature_hash:
type: string
description: The signature hash.
date:
type: string
description: The date in ISO 8601 format.
is_refund_allowed:
type: boolean
description: Indicates if refund is allowed.
is_multi_refund_allowed:
type: boolean
description: Indicates if multi-refund is allowed.
refund_completed:
type: boolean
description: Indicates if refund is completed.
user_agent:
type: string
description: The user agent string of device used to make the api call.
ip_address:
type: string
description: The IP address of device used to make the api call.
description:
type: string
description: The description for the transaction.
payment_link_ref:
type: string
description: The payment link reference.
source:
type: string
description: The source.
payment_method_used:
type: string
description: The payment method used.
merchant_name:
type: string
description: The merchant name.
merchant_key:
type: string
description: The merchant key.
merchant_email_address:
type: string
description: The merchant email address.
channel_name:
type: string
description: The channel name.
payment_link_merchant_order_ref:
type: string
description: The payment link merchant order reference.
customer_email_address:
type: string
description: The customer email address.
customer_phone_number:
type: string
description: The customer phone number.
customer_name:
type: string
description: The customer name.
created_by:
type: string
description: The creator's email address.
user_message:
type: string
description: The user message.
routing_enabled:
type: boolean
description: Indicates if routing is enabled.
payment_page_ref:
type: string
description: The payment page reference.
refund_status:
type: string
description: The refund status.
subscription_order_ref:
type: string
description: The subscription order reference.
order_details:
type: object
description: The order details object.
properties:
data:
type: object
description: The data within the order details.
user_configured_field1:
type: string
description: Custom user configuration field 1
user_configured_field2:
type: string
description: Custom user configuration field 2
user_configured_field3:
type: string
description: Custom user configuration field 3
user_configured_field4:
type: string
description: Custom user configuration field 4
user_configured_field5:
type: string
description: Custom user configuration field 5
user_uuid:
type: string
description: The UUID of the user generated by merchant. Only supported by PayLetter PSP.
auto_refund:
type: boolean
description: Boolean flag to identify if auto refund is enabled. Default is false. Only supported by PayLetter PSP.
is_cross_border_transaction:
type: boolean
description: Boolean flag to identify if the transaction is a cross border transaction.
PaymentLinkContent:
title: PaymentLinkContent
type: object
description: The meta details of the payment link.
properties:
merchantOrderRef:
type: string
description: The unique merchant order reference for the transaction
paymentLinkRef:
type: string
description: The unique payment link reference generated by PortOne.
status:
type: string
description: The status of the payment link. Refer PortOne docs for additional details.
transactionsList:
type: array
items:
$ref: '#/components/schemas/TransactionsContent'
description: The list of transactions details done for the payment link.
TransactionsContent:
title: TransactionsContent
type: object
properties:
channelOrderRef:
type: string
description: The unique order reference of the transaction generated by PSP.
createdAt:
type: string
description: The timestamp of transaction creation.
merchantOrderRef:
type: string
description: The unique order reference of th transaction generated by the merchant.
status:
type: string
description: The status of the transaction.
statusCode:
type: string
description: The status code of the transaction.
statusReason:
type: string
description: The status reason of the transaction.
PSPCredsContent:
title: PSPCredsContent
type: object
description: The JSON object containing the PSP credentials information.
properties:
MerchantUUID:
type: string
description: The unique order reference of the transaction generated by PSP.
PaymentChannelKey:
type: string
description: The Payment Channel Key as mentioned in the PortOne docs.
maskedData:
type: object
description: The masked object of Payment Channel credentials
PSPCredsMetaContent:
title: PSPCredsContent
type: object
description: The JSON object containing the PSP credentials information.
properties:
key:
type: string
description: The key of the Payment Channel. Refer PortOne docs for more details.
type:
type: string
description: The type of the PSP. Where PSP is Gateway, Bank or Digital Wallet.
logo:
type: string
description: The URL of the payment channel logo
creds:
type: object
description: The JSON object of the masked PSP credentials configured in the PortOne.
is_enabled:
type: boolean
description: The boolean flag indicating whether Payment Channel is enabled or not.
country:
type: string
description: The country code of the Payment Channel.
pay_type:
type: string
description: The type of Payment Channel. Is can be either PAYIN or PAYOUT. Refer PortOne docs.
is_va_flow:
type: string
description: The boolean flag indicating whether the Virtual Account flow if present in PSP configuration.
Address:
title: Address object
description: The JSON object containing full address
type: object
properties:
city:
type: string
description: City name
example: "Singapore"
country_code:
type: string
description: 2 digit country code
example: "SG"
country_name:
type: string
description: Full country name
example: "Singapore"
locale:
type: string
description: region locale
example: "en"
line_1:
type: string
description: Line 1 of the address
example: "20 WOODLANDS"
line_2:
type: string
description: Line 2 of the address
example: "LINK 04-20"
postal_code:
type: string
description: Postal code of the area
example: "738733"
state:
type: string
description: State of the address
example: "Singapore"
BillingDetails:
title: Billing details object
description: The JSON object for billing details
type: object
properties:
billing_name:
type: string
description: The billing first and middle name
example: "First Middle"
billing_surname:
type: string
description: The billing last name
example: "Last"
billing_email:
type: string
description: The billing email address
example: "test@gmail.com"
billing_phone:
type: string
description: The billing phone number
example: "8959893980"
billing_address:
$ref: '#/components/schemas/Address'
ShippingDetails:
title: Shipping object
description: The JSON object for shipping details
type: object
properties:
shipping_name:
type: string
description: The shipping first and middle name
example: "First Middle"
shipping_surname:
type: string
description: The shipping last name
example: "Last"
shipping_email:
type: string
description: The shipping email address
example: "test@gmail.com"
shipping_phone:
type: string
description: The shipping phone number
example: "8959893980"
shipping_address:
$ref: '#/components/schemas/Address'
OrderDetails:
title: Orders object
description: The JSON array for order details
type: array
items:
type: object
properties:
id:
type: string
description: The unique identifier of the order-item
name:
type: string
description: The name of the product
price:
type: number
format: double
description: The unit price of the product
quantity:
type: integer
description: The quantity of the product
image:
type: string
description: The URL of the product image
additional_details:
type: object
description: Additional details about the order
TokenParams:
title: Token object
description: The JSON object for initiating transaction using card details
type: object
properties:
token:
type: string
description: Token generated by payment gateway
partial_card_number:
type: string
description: Partial card number used for identification purposes
expiry_month:
type: string
description: Expiration month of the card
expiry_year:
type: string
description: Expiration year of the card
type:
type: string
description: Type of card (e.g. Visa, Mastercard)
save_card:
type: boolean
description: Whether to save the card for future use
is_channel_token:
type: boolean
description: Whether the token is a channel token. Default is false. Used for non-seamless card transactions.
RoutingParams:
title: Routing details object
description: The JSON object for adding routing details, only applicable in routing enabled is set to true
type: object
properties:
type:
type: string
description: The type of routing
example: failover
routing_ref:
type: string
description: The route ID that is created from Admin Dashboard
example: "Route_2P0qQgyROrPuzJDZebGSIsfYsX4"
data:
type: array
description: This is required if you have not created a routing ID from dashboard
items:
type: object
properties:
channel_key:
type: string
description: The channel key
example: OMISE
method_key:
type: string
description: The method key
example: OMISE_CREDIT_CARD
rank:
type: integer
description: The rank of this routing option
example: 1
MerchantDetails:
title: Merchant details object
description: The JSON object for adding merchant details
type: object
properties:
name:
type: string
description: The name of the merchant
example: "Nike"
back_url:
type: string
description: The url of the merchant site
example: "https://demo.portone.cloud/checkout.html"
promo_code:
type: string
description: The promo code enabled on the order by the merchant
example: "testcode"
promo_discount:
type: number
format: double
description: The promo code discount amount on the order by the merchant
example: 0
shipping_charges:
type: number
description: The shipping charges set by the merchant
example: 0
required:
- name
- promo_discount
- shipping_charges
AuthTokenContent:
title: AuthTokenContent
type: object
description: The JSON object containing the authentication token information.
properties:
token:
type: string
description: The authentication token.
expires_in:
type: integer
description: The time in seconds until the token expires.
SignatureHashContent:
title: SignatureHashContent
type: object
description: The JSON object containing the signature hash information.
properties:
signature:
type: string
description: The signature hash.
MerchantTransactionsAPIResponseContent:
title: MerchantTransactionsAPIResponseContent
type: object
description: The object containing the response of Fetch Merchant transactions API
properties:
content:
type: array
items:
$ref: '#/components/schemas/MerchantTransactionsContent'
description: The array of transaction details objects.
total_elements:
description: The number of total_elements in the response.
type: number
total_pages:
description: The number of total_pages in the response.
type: number
size:
description: The size of the current page.
type: number
page:
description: The current page number.
type: number
number_of_elements:
description: The number of elements in the current page.
type: number
MerchantTransactionsContent:
title: MerchantTransactionsContent
type: object
description: The object containing all the payments data of the merchant.
properties:
currency:
type: string
description: The currency of the transaction.
amount:
type: number
format: double
description: The amount of the transaction.
order_ref:
type: string
description: The unique order reference of the transaction generated by the PortOne.
channel_order_ref:
type: string
description: The unique order reference of the transaction generated by PSP.
merchant_order_ref:
type: string
description: The unique order reference of the transaction generated by the merchant.
status:
type: string
description: The status of the transaction. Refer PortOne docs for additional details.
channel_key:
type: string
description: The unique Channel Key of the transaction. Refer PortOne docs for additional details.
method_name:
type: string
description: The unique Payment Method Key of the transaction. Refer PortOne docs for additional details.
method_key:
type: string
description: The method key used for the transaction.
channel_logo:
type: string
description: The PSP logo url.
method_sub_type:
type: string
description: The sub type of the Payment Method. Refer PortOne docs for additional details.
status_code:
type: string
description: The status code of the transaction.
status_reason:
type: string
description: The status reason of the transaction.
status_channel_reason:
type: string
description: The status channel reason of the transaction.
created_at:
type: string
description: The date timestamp of the transaction.
is_refund_allowed:
type: boolean
description: The boolean flag indicating whether refund is allowed for the transaction.
is_multi_refund_allowed:
type: boolean
description: The boolean flag indicating whether multple partial refunds are allowed for the transaction.
remit_status:
type: string
description: The status of the remittance.
created_by:
type: string
description: The creator's email address.
subscription_order_ref:
type: string
description: The subscription order reference.
is_cross_border_transaction:
type: boolean
description: Boolean flag to identify if the transaction is a cross border transaction.
country_code:
type: string
description: The correct country code for the transaction.
buyer_name:
type: string
description: The buyer name of the transaction.
buyer_email:
type: string
description: The buyer email of the transaction.
buyer_phone:
type: string
description: The buyer phone number of the transaction.
buyer_address1:
type: string
description: The buyer address of the transaction.
buyer_address2:
type: string
description: The buyer address of the transaction.
buyer_city:
type: string
description: The buyer city of the transaction.
buyer_country:
type: string
description: The country code of the buyer doing the transaction.
signature_hash:
type: string
description: The signature hash generated for the transaction details. Refer PortOne docs for additional details.
source:
type: string
description: The source of the transaction. API or checkout.
payment_method_used:
type: string
description: The actual payment method used for the transaction.
merchant_key:
type: string
description: The unique PortOne key of the merchant.
merchant_email_address:
type: string
description: The email_address of the merchant.
channel_name:
type: string
description: The channel_name of the PSP used in transaction.
refund_completed:
type: boolean
description: The boolean flag indicating whether refunds is completed for the transaction.
user_agent:
type: string
description: The user_agent of the the device from which the transaction is created.
ip_address:
type: string
description: The IP address of the device from which the transaction is created.
description:
type: string
description: The description of the transaction.
link_order_ref:
type: string
description: The unique order reference of link.
payment_link_ref:
type: string
description: The unique order reference of payment link.
merchant_name:
type: string
description: The name of the merchant.
recon_status:
type: string
description: The status recon for the transaction.
user_configured_field1:
description: Custom user configured field 1
type: string
user_configured_field2:
type: string
description: Custom user configuration field 2
user_configured_field3:
type: string
description: Custom user configuration field 3
user_configured_field4:
type: string
description: Custom user configuration field 4
user_configured_field5:
type: string
description: Custom user configuration field 5
payment_link_merchant_order_ref:
type: string
description: The payment link merchant order reference.
MerchantDccRate:
title: Merchant Configured DCC rate object
description: The JSON object for merchant configured DCC Rates data
type: object
properties:
forex_rate:
type: number
format: double
description: The forex rate data
invoice_amount:
type: number
format: double
description: The Invoice amount value
invoice_currency:
type: string
description: The invoice currency value, e.g. USD
payment_currency:
type: string
description: The payment currency value, e.g. INR
payment_amount:
type: number
format: double
description: The final Payment amount value (self converted by merchant)
show_fx_conversion:
type: boolean
description: Whether to show the FX rate data on checkout
CustomerDetails:
title: Customer Details object for the Payment Link
description: Customer Details object for the Payment Link
type: object
properties:
name:
type: string
description: The name of the customer
email_address:
type: string
description: The email address of the customer
phone_number:
type: string
description: The phone number of the customer
NotesDetails:
title: Notes object used for additional fields
description: Notes object used for additional fields
type: array
items:
type: object
properties:
key:
type: string
description: The name of the additional field
value:
type: string
description: The value of the additional field