If you have no idea how payment processors APIs work, I recommend to start learning Stripe API, it is the most good documented and the simplest to understand and to work with (just my opinion, of course).

Stripe Checkout Example with Default Popup Form

Introduce to Stripe API, simple PHP + WordPress example