Subscription Link Webhook

The subscription link webhook is sent when the status of the subscription link changes.
Refer below for the sample payload.

{
  "allow_accumulate": "N",
  "recurring_amount": 103,
  "chaipaykey": "qcFJvupbcbdcyNFg",
  "currency": "VND",
  "customer_email_address": "[email protected]",
  "customer_name": "Nitesh",
  "customer_phone_number": "+916367890986",
  "environment": "sandbox",
  "frequency": 1,
  "expired_at": "2024-10-01T11:58:40.007Z",
  "link": "https://subscription.portone.cloud/?ref=2mbiztAoKWCBpciTKJiqKLjHu7A",
  "merchant_order_ref": "Subscription_1727351941734",
  "name": "Test - Plan - Ondemand",
  "notify_by_email": false,
  "notify_by_phone": false,
  "order_ref": "2mbiztAoKWCBpciTKJiqKLjHu7A",
  "plan_order_ref": "2mbiB58OfN2ZGbLw6zJRaJ4jBJ0",
  "period": "H",
  "quantity": 1,
  "recurrance_count": 4,
  "source": "checkout",
  "started_at": "2024-09-26T11:59:01.987138Z",
  "created_at": "2024-09-26T11:59:01.988803Z",
  "status": "Active",
  "subscription_type": "REGULAR",
  "signature_hash": "E2K0I3Nl8F2srV/6W5FdInszHXARHJAAQgV73nfwzqI=",
  "total_amount": 412,
  "collected_amount": 103,
  "ip_address": "103.23.238.249",
  "collected_count": 1,
  "portone_key": ""
}

📘

Info

Refer to Subscription Link Webhook Signature section to verify the signature_hash received in the webhook
During testing you can use FOSS Webhook server to setup a webhook endpoint. Create a sample webhook endpoint at webhook.site

Parameter list

additional_cost
object

The additional cost of the subscription


allow_accumulate
string

Whether allow accumulate is enabled or not


recurring_amount
float64

The recurring amount of the subscription


chaipaykey
string

The PortOne key of the merchant


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


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 plan used for the subscription


notify_by_email
boolean

This boolean flag indicates whether the subscription link is notified to the customer email provided, with true meaning the customer is notified via email and false meaning it was not


notify_by_phone
boolean

This boolean flag indicates whether the subscription link is notified to the customer phone number provided, with true meaning the customer is notified via email and false meaning it was not


order_ref
string

The PortOne order reference of the subscription


plan_order_ref
string

The plan order reference used for 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

Calculate hash as mentioned at Hash Generation Reference, verify if it is equal to signature_hash received in the webhook


total_amount
float64

The total amount of the subscription


total_additional_cost
float64

The total additional cost 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 PortOne key of the merchant