laravel / cashier-paddle

Cashier Paddle provides an expressive, fluent interface to Paddle's subscription billing services.
https://laravel.com/docs/cashier-paddle
MIT License
245 stars 57 forks source link

How to generate invoice for users #33

Closed alzaabi98 closed 4 years ago

alzaabi98 commented 4 years ago

Does the package provide any means to generate invoices or this has to be manual process ?

GrahamCampbell commented 4 years ago

Note that if you are using Paddle, you are legally not allowed to generate invoices yourself. You have to have Paddle issue them, because they are the merchant of record. You are not the seller, they are: the invoice is between them and the customer (unlike Stripe!).

driesvints commented 4 years ago

@GrahamCampbell is correct. Plus Paddle doesn't even gives us all the info through the API that we'd need (like address, individual line items, etc).

alzaabi98 commented 4 years ago

@GrahamCampbell @driesvints so how can customer get invoices then ? if someone registered in my site and then subscribe to plan let us say monthly . how he can generate invoices. ? at this time my site charged him using cahier-paddle but he cant access paddle directly as he does have account there ? still not getting the full picture.

i know most sites offered a button to download invoice for in subscription page like in laracasts for example.

driesvints commented 4 years ago

@alzaabi98 I think you missed this section in the documentation: https://laravel.com/docs/7.x/cashier-paddle#transactions

Screenshot 2020-07-07 at 12 49 20

alzaabi98 commented 4 years ago

@alzaabi98 I think you missed this section in the documentation: https://laravel.com/docs/7.x/cashier-paddle#transactions

Screenshot 2020-07-07 at 12 49 20

@driesvints yes i did ,, as i was searching "generate invoices" , the doc is not clear as cachier-stripe which has for example sections called

Screen Shot 2020-07-07 at 4 31 17 PM
driesvints commented 4 years ago

Cashier Stripe and Cashier Paddle are two totally different libraries just like Stripe and Paddle are two totally different services. They don't offer the exact same functionality.

zackAJ commented 1 month ago

here you go

Route::get('invoice',function(){
    $trans =  request()->user()->transactions()->first();
    return "<a href='{$trans->invoicePdf()}' target='_blank'>invoice</a>";
});