Webhook Integration
Webhooks refers to a combination of elements that collectively create a notification and reaction system within a larger integration. PortOne uses webhooks to notify your application when an event happens in your account. Webhooks are particularly useful for asynchronous events like when the status of a payment transaction gets updated.
Webhook Configuration#
- Create a webhook endpoint on your server with POST method.
- Register the webhook endpoint on PortOne Merchant portal in API Settings > Webhooks.
PortOne Webhooks#
Currently following webhook types are supported on PortOne
PAYIN - Payment Status Update#
This webhook gets triggered whenever the status of the payment transaction gets updated at payment channel's end. Refer following sample payload received in Webhooks.
Merchant will receive the following data as webhook response after payment completion:
Parameter list#
amount#
float64#
The amount of the transaction
currency#
string#
The currency of the transaction
merchant_order_ref#
string#
Order Reference sent by merchant to initiate transaction
order_ref#
string#
PortOne's Order Reference, used further for refund and other disputes
channel_order_ref#
string#
Payment Channel's Order Reference for the transaction
payment_link_ref#
string#
Payment Link's Order Reference
link_order_ref#
string#
Order Reference sent by merchant to initiate payment link
country_code#
string#
The country code of the transaction
user_message#
string#
The user message of the transaction
status#
string#
The current status of the transaction
status_channel_reason#
string#
The reason given by the PSP for the status
status_code#
string#
The status code of the transaction
status_reason#
string#
The reason for the transaction status
signature_hash#
string#
Calculate hash as mentioned at [Hash Generation Reference], verify if it is equal to signature_hash
buyer_address1#
string#
The primary address of the buyer
buyer_address2#
string#
The secondary address of the buyer
buyer_city#
string#
The city of the buyer
buyer_country#
string#
The country code of the buyer
buyer_email#
string#
The email address of the buyer
buyer_name#
string#
The name of the buyer
buyer_phone#
string#
The phone number of the buyer
channel_key#
string#
The key of the payment channel
channel_name#
string#
The name of the payment channel
method_key#
string#
The key of the payment method used for the transaction
method_name#
string#
The name of the payment method used for the transaction
method_sub_type#
string#
The sub type of the payment method used for the transaction
merchant_key#
string#
The key of the merchant
merchant_name#
string#
The name of the merchant
merchant_email_address#
string#
The email address of the merchant
source#
string#
The source of the transaction
ip_address#
string#
The IP address of the buyer
user_agent#
string#
The user agent of the transaction
created_at#
string#
The date and time when the transaction was created
is_refund_allowed#
boolean#
Whether refund is allowed for the transaction
is_multi_refund_allowed#
boolean#
Whether multiple refunds are allowed for the transaction
environment#
string#
The environment of the transaction
description#
string#
The description of the transaction
payment_method_used#
string#
The payment method used for the transaction
receipt_url#
string#
The URL of the receipt of the transaction
masked_card_number#
string#
The masked card number of the transaction
cross_border_data#
object#
The cross border data of the transaction provided by the payment channel
additional_payment_details#
object#
The additional data of the transaction provided by the payment channel
installment_details#
object#
The installment details of the transaction provided by the payment channel
PAYIN - Refund Status Update#
This webhook gets triggered whenever the status of the refund transaction gets updated at the payment channel's end. Refer following sample payload received in Webhooks.
Merchant will receive the following data as webhook response after a successful refund:
Parameter list#
refund_date#
string#
The date and time when the refund was created
refund_id#
string#
The unique ID of the refund provided by merchant
psp_refund_id#
string#
The unique ID of the refund provided by PSP
amount#
float64#
The amount of the refund transaction
currency#
string#
The currency of the refund transaction
refund_status#
string#
The status of the refund transaction
refund_type#
string#
The type of the refund full or partial
refund_reason#
string#
The reason of the refund
merchant_id#
string#
Order Reference sent by merchant to initiate transaction
description#
string#
The description of the refund
payment_txn_ref#
string#
The payment transaction reference of the refund
payment_channel#
string#
The payment channel of the refund transaction
payment_method#
string#
The payment method of the refund transaction
PAYIN - Payment Link Status Update#
This webhook gets triggered whenever the status of the payment link gets updated at the payment channel's end. Refer following sample payload received in Webhooks.
Merchant will receive the following data as webhook response after a successful payment link status update:
Parameter list#
link_ref#
string#
The unique ID of the payment link provided by merchant
link#
string#
The link of the payment link provided by merchant used for payment
status#
string#
The status of the payment link
amount#
float64#
The amount of the transaction
currency#
string#
The currency of the transaction
chaipaykey#
string#
The key provided by Portone
countryCode#
string#
The country code of the transaction
success_url#
string#
The success URL of the merchant
cancel_url#
string#
The cancel URL of the merchant
merchant_order_ref#
string#
Order Reference sent by merchant to initiate transaction
is_billing_shipping_same#
boolean#
If billing and shipping address are same or not
merchant_key#
string#
The key of the merchant
merchant_name#
string#
The name of the merchant
merchant_logo#
string#
The logo of the merchant
merchant_back_url#
string#
The back URL of the merchant
merchant_shipping_charges#
float64#
The shipping charges of the merchant
merchant_promo_code#
string#
The promo code of the merchant
merchant_promo_discount#
float64#
The promo discount of the merchant
user_agent#
string#
The user agent of the merchant
ip_address#
string#
The IP address of the merchant
expiry_hours#
integer#
The expiry hours of the payment link
created_at#
string#
Time of creation of the payment link
source#
string#
The source of the payment link
description#
string#
The description of the payment link
mobile_redirect_url#
string#
The mobile redirect URL of the payment link
show_shipping_details#
boolean#
The show shipping details of the payment link
show_back_button#
boolean#
The show back button flag of the payment link
default_guest_checkout#
boolean#
The defaultguest checkout flag of the payment link
is_checkout_embed#
boolean#
The ischeckout embed flag of the payment link
notify_by_email#
boolean#
The notify by email of the payment link
notify_by_phone#
boolean#
The notify by phone of the payment link
show_items#
boolean#
The show items of the payment link
merchant_email_address#
string#
The email address of the merchant
customer_name#
string#
The name of the customer
customer_email_address#
string#
The email address of the customer
customer_phone_number#
string#
The phone number of the customer
payment_page_ref#
string#
The payment page ref of the payment link
signature_hash#
string#
The signature hash of the payment link
unit_amount#
float64#
The unit amount of the payment link
stock_quantity#
integer#
The stock quantity of the item
show_saved_cards#
boolean#
The show saved cards of the payment link
portone_key#
string#
The key provided by PortOne
user_configured_field1#
string#
The user configured field 1
user_configured_field2#
string#
The user configured field 2
user_configured_field3#
string#
The user configured field 3
user_configured_field4#
string#
The user configured field 4
user_configured_field5#
string#
The user configured field 5
PAYIN - Subscription Status Update#
This webhook gets triggered whenever the status of the payment subscription gets updated at payment channel's end. Refer following sample payload received in Webhooks.
Merchant will receive the following data as webhook response after a successful subscription status update:
Parameter list#
allow_accumulate#
string#
Whether allow accumulate is enabled or not
recurring_amount#
float64#
The recurring amount of the subscription
chaipaykey#
string#
The key provided by Portone
currency#
string#
The currency of the subscription
customer_email_address#
string#
The email address of the customer
customer_name#
string#
The name of the customer
customer_phone_number#
string#
The phone number of the customer
environment#
string#
The environment of the subscription
frequency#
integer#
The frequency of the subscription
expired_at#
string#
The expiry date of the subscription
link#
string#
The link of the subscription
merchant_order_ref#
string#
The order reference of the subscription provided by merchant
name#
string#
The name of the subscription plan
notify_by_email#
boolean#
The notify by email flag of the subscription
notify_by_phone#
boolean#
The notify by phone flag of the subscription
order_ref#
string#
The Portone order reference of the subscription
plan_order_ref#
string#
The plan order reference of the subscription
period#
string#
The period of the subscription
quantity#
integer#
The quantity of the subscription
recurrance_count#
integer#
The recurrance count of the subscription
source#
string#
The source of the subscription
started_at#
string#
The start date of the subscription
created_at#
string#
The created date of the subscription
status#
string#
The status of the subscription
subscription_type#
string#
The type of the subscription
signature_hash#
string#
The signature hash of the subscription
total_amount#
float64#
The total amount of the subscription
collected_amount#
float64#
The collected amount of the subscription
ip_address#
string#
The IP address of the subscription
collected_count#
integer#
The collected count of the subscription
portone_key#
string#
The key provided by Portone
PAYOUT - Payout Status Update#
This webhook gets triggered whenever the status of the payout transaction gets updated at payment channel's end. Refer following sample payload received in Webhooks.
Merchant will receive the following data as webhook response after a successful payout status update:
Parameter list#
vaaccount_no#
string#
The virtual account number of the payment channel
txn_ref#
string#
The transaction reference of the payment channel
merchant_txn_ref#
string#
The merchant transaction reference of the payment channel
status#
string#
The status of the payout transaction
status_channel_reason#
string#
The status reason of the payout transaction
is_approved#
boolean#
The approval status of the payout transaction
approved_by#
string#
The approved by of the payout transaction
approved_time#
string#
The approved time of the payout transaction
is_verified#
boolean#
The verification status of the payout transaction
verified_by#
string#
The verified by of the payout transaction
verified_time#
string#
The verified time of the payout transaction
due_date#
string#
The due date of the payout transaction
to_account_no#
string#
The account number of the payout transaction to be paid
channel_ref#
string#
The channel reference of the payout transaction
amount#
float64#
The amount of the payout transaction
currency#
string#
The currency of the payout transaction
environment#
string#
The environment of the payout transaction
approved_status#
string#
The approved status of the payout transaction
verified_status#
string#
The verified status of the payout transaction
remarks#
string#
The remarks of the payout transaction
user_message#
string#
The user message of the payout transaction
send_email#
boolean#
The send email flag of the payout transaction
send_sms#
boolean#
The send sms flag of the payout transaction
bank_name#
string#
The bank name of the payout transaction
account_name#
string#
The account name of the payout transaction
email_notification_sent#
boolean#
The email notification sent flag of the payout transaction
sms_notification_sent#
boolean#
The sms notification sent flag of the payout transaction
sms_sent#
string#
The sms sent of the payout transaction
email_sent#
string#
The email sent of the payout transaction
is_split_payout#
boolean#
The split payout flag of the payout transaction
is_parent_split#
boolean#
The parent split flag of the payout transaction
split_count#
integer#
The split count of the payout transaction
original_merchant_txn_ref#
string#
The original merchant transaction reference of the payout transaction
transaction_type#
string#
The transaction type of the payout transaction
fund_source#
string#
The fund source of the payout transaction
recipient_emails#
string#
The recipient emails of the payout transaction
tip
During testing you can use FOSS Webhook server to setup webhook endpoint. Create a sample webhook at webhook.site