Get paid for your app by collecting a one time charge.
Webhooks for Subscription
You can register webhooks for specific shop events. For Subscription, the following webhook topic is available:
- app_subscriptions/update: Triggered when the status of an app purchase one time is changed.
What you can do with Subscription
The Haravan API lets you do the following with the Subscription resource.
Subscription properties
id | "id": "6141d6266e269fed5b515c89" The subscription ID of the application charge. |
client_id | "client_id": "9ca6a90a2f50d894e6a123f5cd7ffa62" The Client ID of the application. |
created_at | "created_at": "2021-09-15T11:17:03.458Z" The date and time (ISO 8601 format) when the application charge was created. |
updated_at | "updated_at": "2021-09-15T11:17:03.458Z" The date and time (ISO 8601 format) when the application charge was last updated. |
expired_at | "expired_at": "2024-08-29T11:17:00Z" The date and time (ISO 8601 format) when the application charge ends. |
cancelled_at | "cancelled_at": null The date and time (ISO 8601 format) when the merchant canceled their application charge. |
name | "name": "Promotion Bar" The application name. |
price | "price": 1200000 The price of the application. |
plan_id | "plan_id": "plan_app_449_1713" The plan id of the application. |
quantity | "quantity": 1 The quantity of plan. |
discount_amounts | "discount_amounts": 0 The discount applied to the price of the application. |
total | "total": 1200000 The value of: price * quantity |
amount_paid | "amount_paid": 1200000 The value of: total - discount_amounts |
status | "status": "active" The status of the application. Valid values:
|
Example webhook:
POST HTTP/1.1 Headers: Content-Type: application/json; charset=utf-8 X-Haravan-HmacSha256: t4mhmjWKTfHND1kC9nWFXtvKyOCYj3rUUycIfkKl6Cw= X-Haravan-Topic: app_subscriptions/update X-Haravan-Org-Id: 1000114691 X-Haravan-Subscription-Id: 6141d6266e269fed5b515c89 Body: { "id": "6141d6266e269fed5b515c89", "client_id": "9ca6a90a2f50d894e6a123f5cd7ffa62", "created_at": "2021-09-15T11:17:03.458Z", "updated_at": "2021-09-15T11:17:03.458Z", "expired_at": "2024-08-29T11:17:00Z", "cancelled_at": null, "name": "Promotion Bar", "price": 1200000, "plan_id": "plan_app_449_1713", "quantity": 1, "discount_amounts": 0, "total": 1200000, "amount_paid": 1200000, "status": "active" }
Endpoints
GET https://apis.haravan.com/com/apps/app_subscriptions.json
HTTP/1.1 200 OK
{ "app_subscriptions": [ { "id": "61cec21e84b87c000192ec49", "client_id": "6e6d****30a4", "created_at": "2021-12-29T05:46:11.623Z", "expired_at": "2022-01-13T05:46:11.623Z", "updated_at": "2021-12-29T05:46:11.623Z", "cancelled_at": null, "total": 200000, "amount_discount": 0, "amount_paid": 200000, "quantity": 1, "status": "active", "plan_id": "plan_app_2209_1793", "name": "Hara Multi-language", "price": 200000 } ] }