According to the API specification, payments in the Freemius API represent acknowledgments of payments received for various cases:
- Initial payment of a subscription
- Renewal payment of a subscription
- One-time payment for a product
- Refunds, disputes, and chargebacks
Based on the API specification's Payment schema:
id
- Unique identifieruser_id
- Associated user identifier- Payment details and status information
GET /products/{product_id}/payments/{payment_id}.json
Retrieves detailed information about a specific payment.
product_id
(path) - The ID of the productpayment_id
(path) - The ID of the payment
GET /products/{product_id}/payments.json
Retrieves a list of payments associated with a product.
GET /products/{product_id}/installs/{install_id}/payments.json
Retrieves payments associated with a specific installation.
product_id
(path) - The ID of the productinstall_id
(path) - The ID of the installation
GET /products/{product_id}/users/{user_id}/payments.json
Retrieves payments made by a specific user.
The API handles various types of payments:
- Subscription payments (initial and renewals)
- One-time payments
- Refunds and disputes
Payments can be tracked at different levels:
- Product level
- Installation level
- User level
Payment-related endpoints may return the following error responses:
400
- Bad Request401
- Unauthorized402
- Payment Required404
- Payment Not Found
curl -X GET "https://api.freemius.com/v1/products/{product_id}/payments/{payment_id}.json" \
-H "Authorization: Bearer YOUR_API_KEY"
curl -X GET "https://api.freemius.com/v1/products/{product_id}/payments.json" \
-H "Authorization: Bearer YOUR_API_KEY"
curl -X GET "https://api.freemius.com/v1/products/{product_id}/users/{user_id}/payments.json" \
-H "Authorization: Bearer YOUR_API_KEY"
After understanding payments, you can:
- Learn about Subscriptions
- Explore Carts
- Understand Coupons