Secure Invoice Download API for User-Specific Payments
We have introduced a new API endpoint to help makers easily and securely download invoices for users. The new endpoint is:
/products/{product_id}/users/{user_id}/payments/{payment_id}/invoice.pdf
Detailed documentation can be found here.
This is especially useful if you’re implementing the Customer Portal inside your application (for example using the JS SDK). The endpoint validates that the payment belongs to the specified user before delivering the invoice, adding an extra layer of safety in user-facing integrations. For these use cases, we recommend using this new endpoint over the more direct one.
