First of all, there are two ways to accomplish that.
- Create an account at http://www.block.io, generate an API there and they will give you some endpoints to query the blockchain, generate new addresses for your wallet, broadcast transactions and so on.
- You can create your own endpoint if you run a full node of bitcoin, there you can create your own transaction, query the mempool for unconfirmed transactions, query blocks to find out if your address is in any of them.
The second way is kinda tricky since you will need to understand how the transactions are stored in the blocks, maybe some parsing, but if you are starting I really recommend you to stick to the first way.
Developing an exchange is complicated, there are a lots of factors to account for. When I was developing mine, I got several issues with transaction checks and confirmation.