Payments Implementation

Hey! I want to generate a Cardano address for each of my clients for making payments for my services. Maybe there is a native approach to forwarding funds to a single address? Perhaps generating a pointer address with an incremented index would work in this case?

Why would you want to forward the Ada?

Just take one of the receive addresses that you can see in any of the wallet applications per client. They will all contribute to the total of the wallet automatically.

Alright, this fits perfectly.

I still have little understanding of how smart contracts work on Cardano. Thus, how should I verify that the output I found in the transaction to my address is spendable and isn’t locked by the script and I can safely deliver the product to the customer?

Which script?

If they send Ada directly to an address in your wallet, then they cannot be locked. As long as you have the seeds to this wallet (or the hardware ledger), you will be able to spend them. There is no locking.

If you want to write a “smart” contract or dApp for your sales, then they would not directly transfer to one of your addresses, but to an address of the script. But what should be the use of such a contract?

OK, understood. So the only way they can become unspendable is if I provide not a regular address but a contract address with a certain logic. Otherwise, outputs are spendable as long as the network validates the transaction.