Payment service providers (PSPs) all handle payments in different ways meaning every integration will be a little different. Because of this
@deity/falcon-payments tries to be as indiscriminate as possible.
There are 3 main parts involved in the payment process:
- A PSP registered in your server config
- A Payment UI that is mapped to a provider
- PSP API (Stripe, Braintree, PayPal etc.)
Payment Flow Steps
- Account / API keys created
- Payment provider created and configured in config files.
- Client side UI component created (payment form)
- Client side component mapped to provider
- Client side component initiated
- Triggers `initiate` method in payment provider. Authentication requested
- Token / Auth info returned
- PSP auth pushed to client side component
- User triggers payment (fills in form and submits)
- Triggers `validate` method in payment provider
- Payment handled
- Payment response handled
Payment Flow Diagram
This is a general overview of how payments work in the Falcon Platform checkout. All payment service providers are different, as are all implementations so this may vary slightly for you.
This example contains a step by step guide to adding a new payment method.