In order to use payment services,
1) you have to decide which payment gateway are you going to use. Here is a sample comparison:
2) On selecting the gateway, there will be a set of API and the documentation for the integration will help you integrating your application.
you can checkout this article to understand how it will work: