Don't lock the database for the entire payment processing
Use "journaling" (basically keep a nonce in the db and send it in the stripe command as metadata). Or hey, use that nonce as stripe's idempotency key. Nice.
GitHost.io will be shut down on June 1, 2019. At that point this instance will be unreachable and all data will be irrevocably deleted. More details at https://about.gitlab.com/gitlab-hosted/#githost-is-shutting-down-on-june-1st-2019