v1
latestOpenAPI 3.0.02026-07-246335313.6 KBPayment APIs
Initiate Payment
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.
post/api/initiatePayment
Headers
Content-Typestring
X-Portone-Client-Keystring
Request body
Example request
{
"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"
}Response
Successful response