There are many approaches you can take. I'm not completely sure of your use case but you can use these for reference.
1) If your payment gateway uses an event call back mechanism, you can subscribe to that event and up on receiving the event, you call a storeToSaleforce method that creates and stores the account info in salesforce.
2) I think it's better to create an account in salesforce first before you pass the client info to payment gateway. Have an extra field that you can update once you receive the payment gateway status. This helps in tracing back any payment gateway issues that might rise like if the payment has gone through but the gateway returns error you'll have some info to trace back.
There are many approaches you can take. I'm not completely sure of your use case but you can use these for reference.
1) If your payment gateway uses an event call back mechanism, you can subscribe to that event and up on receiving the event, you call a storeToSaleforce method that creates and stores the account info in salesforce.
2) I think it's better to create an account in salesforce first before you pass the client info to payment gateway. Have an extra field that you can update once you receive the payment gateway status. This helps in tracing back any payment gateway issues that might rise like if the payment has gone through but the gateway returns error you'll have some info to trace back.