The following are sample HTTP requests and responses.
The placeholders shown need to be replaced with actual values.
POST /jsv/oneway/SubscriptionWebhook HTTP/1.1
Host: api.kidkare.com
Content-Type: text/jsv
Content-Length: length
{
payload: String,
payloadData:
{
event_id: 0,
event_type: String,
event_source: String,
event_time: 0001-01-01,
data:
{
subscription:
{
subscription_id: 0,
product_id: 0,
product_name: String,
status: String,
interval: 0,
interval_unit: String,
next_billing_at: 0001-01-01,
trial_ends_at: 0001-01-01,
card:
{
payment_gateway: String,
card_id: 0,
last_four_digits: 0,
expiry_month: 0,
expiry_year: 0
},
bank_account:
{
payment_gateway: String,
account_id: 0,
last_four_digits: 0
},
plan:
{
plan_id: 0,
name: String,
plan_code: String,
quantity: 0,
price: 0
},
addons:
[
{
addon_code: String,
quantity: 0
}
],
customer:
{
customer_id: 0,
first_name: String,
last_name: String,
email: String,
ip_address: String
},
custom_fields:
[
{
label: String,
value: String
}
],
activated_at: 0001-01-01,
cancelled_at: 0001-01-01,
amount: 0,
coupon:
{
coupon_code: String,
discount_amount: 0
},
child_invoice_id: String
},
payment:
{
date: 0001-01-01,
autotransaction:
{
last_four_digits: String
},
invoices:
[
{
subscription_ids:
[
String
],
amount_applied: 0,
invoice_id: 0
}
]
}
}
}
}