Many-to-one
Rehive offers an example implementation for a payment processor integration for cash-in and cash-out. The cash-in and cash-out implementations are outlined in the two diagrams below and we have made the source code cash-in integration via the credit card provider Stripe available on Github (https://github.com/rehive/service-stripe).
Diagram 1. Many-to-one cash in
Diagram 2. Many-to-one cash-out
One-to-one
Cash-in or cash-out integrations for the one-to-one custody model typically require integration with both a payment processor and the underlying store-of-value/ custodian. There is also the option to integrate with providers that offer both payment processing and account creation + custody such as Stripe Treasury. An example implementation of cash-in and cash-out for a one-to-one custody model is provided in the diagrams below.
Diagram 3. One-to-one cash in
Diagram 4. One-to-one cash out