def METHOD_NAME(connection: SAConnection):
    async def _init(payment_id: str):
        # get payment_id from payment-gateway
        data = random_payment_transaction(payment_id=payment_id)
        # init successful: set timestamp
        data["initiated_at"] = utcnow()
        # insert
        await connection.execute(payments_transactions.insert().values(data))
        return data
    return _init